Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Add RCS keyword. Avoid overflow in constant.



details:   https://anonhg.NetBSD.org/src/rev/e7dd1a14a14f
branches:  trunk
changeset: 782863:e7dd1a14a14f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Nov 23 14:48:31 2012 +0000

description:
Add RCS keyword. Avoid overflow in constant.

diffstat:

 sys/netinet/tcp_vtw.h |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 168b687075d8 -r e7dd1a14a14f sys/netinet/tcp_vtw.h
--- a/sys/netinet/tcp_vtw.h     Fri Nov 23 14:27:14 2012 +0000
+++ b/sys/netinet/tcp_vtw.h     Fri Nov 23 14:48:31 2012 +0000
@@ -1,3 +1,4 @@
+/*     $NetBSD: tcp_vtw.h,v 1.6 2012/11/23 14:48:31 joerg Exp $        */
 /*
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -186,7 +187,7 @@
 {
        fatp_t full;
 
-       full.inuse = ~0;
+       full.inuse = (1U << FATP_NTAGS) - 1U;
 
        return (fp->inuse == full.inuse);
 }



Home | Main Index | Thread Index | Old Index