summaryrefslogtreecommitdiff
path: root/usr.bin/vi/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-08 21:05:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-08 21:05:41 +0000
commitfcde5ec1a7e7dda343ba822c73be5f080b0ff0c8 (patch)
treefae8f53125cc8dbd05f4b107c32d3733dbfdd6da /usr.bin/vi/include
parente36b0788688a5dd823dc99c40167de645deb9988 (diff)
Explicit braces around macro fields and logical operations, gets rid of 148
warnings, no functional change. From Ray Lai.
Diffstat (limited to 'usr.bin/vi/include')
-rw-r--r--usr.bin/vi/include/bitstring.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/vi/include/bitstring.h b/usr.bin/vi/include/bitstring.h
index f473245ea73..6adc7726508 100644
--- a/usr.bin/vi/include/bitstring.h
+++ b/usr.bin/vi/include/bitstring.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bitstring.h,v 1.3 2003/06/03 02:56:22 millert Exp $ */
+/* $OpenBSD: bitstring.h,v 1.4 2006/01/08 21:05:40 miod Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -76,8 +76,8 @@ typedef unsigned char bitstr_t;
/* clear bits start ... stop in bitstring */
#define bit_nclear(name, start, stop) { \
- register bitstr_t *_name = name; \
- register int _start = start, _stop = stop; \
+ register bitstr_t *_name = (name); \
+ register int _start = (start), _stop = (stop); \
register int _startbyte = _bit_byte(_start); \
register int _stopbyte = _bit_byte(_stop); \
if (_startbyte == _stopbyte) { \
@@ -93,8 +93,8 @@ typedef unsigned char bitstr_t;
/* set bits start ... stop in bitstring */
#define bit_nset(name, start, stop) { \
- register bitstr_t *_name = name; \
- register int _start = start, _stop = stop; \
+ register bitstr_t *_name = (name); \
+ register int _start = (start), _stop = (stop); \
register int _startbyte = _bit_byte(_start); \
register int _stopbyte = _bit_byte(_stop); \
if (_startbyte == _stopbyte) { \
@@ -110,8 +110,8 @@ typedef unsigned char bitstr_t;
/* find first bit clear in name */
#define bit_ffc(name, nbits, value) { \
- register bitstr_t *_name = name; \
- register int _byte, _nbits = nbits; \
+ register bitstr_t *_name = (name); \
+ register int _byte, _nbits = (nbits); \
register int _stopbyte = _bit_byte(_nbits), _value = -1; \
for (_byte = 0; _byte <= _stopbyte; ++_byte) \
if (_name[_byte] != 0xff) { \
@@ -125,8 +125,8 @@ typedef unsigned char bitstr_t;
/* find first bit set in name */
#define bit_ffs(name, nbits, value) { \
- register bitstr_t *_name = name; \
- register int _byte, _nbits = nbits; \
+ register bitstr_t *_name = (name); \
+ register int _byte, _nbits = (nbits); \
register int _stopbyte = _bit_byte(_nbits), _value = -1; \
for (_byte = 0; _byte <= _stopbyte; ++_byte) \
if (_name[_byte]) { \