diff options
author | alfred <alfred@FreeBSD.org> | 2002-11-09 12:55:07 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-11-09 12:55:07 +0000 |
commit | 533541c47bc98b118c55a2c646188e129abde3b8 (patch) | |
tree | 00d1b1f343ceacaa4c61b263e81e4f79e7449948 /sys/net/zlib.c | |
parent | 75770c482cd1308590f40a83da5eccefb24a2d44 (diff) | |
download | FreeBSD-src-533541c47bc98b118c55a2c646188e129abde3b8.zip FreeBSD-src-533541c47bc98b118c55a2c646188e129abde3b8.tar.gz |
Fix instances of macros with improperly parenthasized arguments.
Verified by: md5
Diffstat (limited to 'sys/net/zlib.c')
-rw-r--r-- | sys/net/zlib.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/net/zlib.c b/sys/net/zlib.c index 18939dc..8797405 100644 --- a/sys/net/zlib.c +++ b/sys/net/zlib.c @@ -1983,7 +1983,7 @@ local void copy_block OF((deflate_state *s, charf *buf, unsigned len, int header)); #ifndef DEBUG_ZLIB -# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) +# define send_code(s, c, tree) send_bits(s, tree[(c)].Code, tree[(c)].Len) /* Send a code of the given tree. c and tree must not have side effects */ #else /* DEBUG_ZLIB */ @@ -2041,16 +2041,16 @@ local void send_bits(s, value, length) #else /* !DEBUG_ZLIB */ #define send_bits(s, value, length) \ -{ int len = length;\ - if (s->bi_valid > (int)Buf_size - len) {\ - int val = value;\ - s->bi_buf |= (val << s->bi_valid);\ - put_short(s, s->bi_buf);\ - s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ - s->bi_valid += len - Buf_size;\ +{ int len = (length);\ + if ((s)->bi_valid > (int)Buf_size - len) {\ + int val = (value);\ + (s)->bi_buf |= (val << (s)->bi_valid);\ + put_short((s), (s)->bi_buf);\ + (s)->bi_buf = (ush)val >> (Buf_size - (s)->bi_valid);\ + (s)->bi_valid += len - Buf_size;\ } else {\ - s->bi_buf |= (value) << s->bi_valid;\ - s->bi_valid += len;\ + (s)->bi_buf |= (value) << (s)->bi_valid;\ + (s)->bi_valid += len;\ }\ } #endif /* DEBUG_ZLIB */ @@ -5345,10 +5345,10 @@ void zcfree (opaque, ptr) #define NMAX 5552 /* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ -#define DO1(buf,i) {s1 += buf[i]; s2 += s1;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO1(buf,i) {s1 += buf[(i)]; s2 += s1;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,(i)+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,(i)+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,(i)+4); #define DO16(buf) DO8(buf,0); DO8(buf,8); /* ========================================================================= */ |