Fri Nov 23 14:48:31 2012 UTC ()
Add RCS keyword. Avoid overflow in constant.


(joerg)
diff -r1.5 -r1.6 src/sys/netinet/tcp_vtw.h

cvs diff -r1.5 -r1.6 src/sys/netinet/tcp_vtw.h (expand / switch to unified diff)

--- src/sys/netinet/tcp_vtw.h 2011/06/07 22:51:32 1.5
+++ src/sys/netinet/tcp_vtw.h 2012/11/23 14:48:31 1.6
@@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
 1/* $NetBSD: tcp_vtw.h,v 1.6 2012/11/23 14:48:31 joerg Exp $ */
1/* 2/*
2 * Copyright (c) 2011 The NetBSD Foundation, Inc. 3 * Copyright (c) 2011 The NetBSD Foundation, Inc.
3 * All rights reserved. 4 * All rights reserved.
4 * 5 *
5 * This code is derived from software contributed to The NetBSD Foundation 6 * This code is derived from software contributed to The NetBSD Foundation
6 * by Coyote Point Systems, Inc. 7 * by Coyote Point Systems, Inc.
7 * 8 *
8 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
10 * are met: 11 * are met:
11 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -176,27 +177,27 @@ struct fatp_mi { @@ -176,27 +177,27 @@ struct fatp_mi {
176}; 177};
177 178
178static inline int 179static inline int
179fatp_ntags(void) 180fatp_ntags(void)
180{ 181{
181 return FATP_NTAGS; 182 return FATP_NTAGS;
182} 183}
183 184
184static inline int 185static inline int
185fatp_full(fatp_t *fp)  186fatp_full(fatp_t *fp)
186{ 187{
187 fatp_t full; 188 fatp_t full;
188 189
189 full.inuse = ~0; 190 full.inuse = (1U << FATP_NTAGS) - 1U;
190 191
191 return (fp->inuse == full.inuse); 192 return (fp->inuse == full.inuse);
192} 193}
193 194
194struct vtw_common; 195struct vtw_common;
195struct vtw_v4; 196struct vtw_v4;
196struct vtw_v6; 197struct vtw_v6;
197struct vtw_ctl; 198struct vtw_ctl;
198 199
199/*!\brief common to all vtw 200/*!\brief common to all vtw
200 */ 201 */
201typedef struct vtw_common { 202typedef struct vtw_common {
202 struct timeval expire; /* date of birth+msl */ 203 struct timeval expire; /* date of birth+msl */