diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2008-11-08 12:54:59 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2008-11-08 12:54:59 +0000 |
commit | 8082b519e8eb7d4b72eb0bbea42ac126c4ce8d8c (patch) | |
tree | 1db91e3f2a917fe69d1b56dd56852adb9458e7a0 /sys/netinet/tcp_timer.h | |
parent | 7b3a9f02e74287ece0a22b140146ed8e4ace729d (diff) |
fix macros up so they use the do { } while (/* CONSTCOND */ 0) idiom
ok deraadt@ otto@
Diffstat (limited to 'sys/netinet/tcp_timer.h')
-rw-r--r-- | sys/netinet/tcp_timer.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index 805c5bd0628..6f0dceda02a 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.h,v 1.11 2007/11/24 12:59:28 jmc Exp $ */ +/* $OpenBSD: tcp_timer.h,v 1.12 2008/11/08 12:54:58 dlg Exp $ */ /* $NetBSD: tcp_timer.h,v 1.6 1995/03/26 20:32:37 jtc Exp $ */ /* @@ -130,13 +130,14 @@ const char *tcptimers[] = /* * Force a time value to be in a certain range. */ -#define TCPT_RANGESET(tv, value, tvmin, tvmax) { \ - (tv) = (value); \ - if ((tv) < (tvmin)) \ - (tv) = (tvmin); \ - else if ((tv) > (tvmax)) \ - (tv) = (tvmax); \ -} +#define TCPT_RANGESET(tv, value, tvmin, tvmax) \ +do { \ + (tv) = (value); \ + if ((tv) < (tvmin)) \ + (tv) = (tvmin); \ + else if ((tv) > (tvmax)) \ + (tv) = (tvmax); \ +} while (/* CONSTCOND */ 0) #ifdef _KERNEL typedef void (*tcp_timer_func_t)(void *); |