summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2016-03-16 04:33:02 +0000
committermmcc <mmcc@cvs.openbsd.org>2016-03-16 04:33:02 +0000
commit672c84a059c0e6383df39d4449f3ac4e8da16761 (patch)
tree27582f46eaa51f7ca367478f14b8d20adc0b99a5
parent6cf158f9338063ed621f5853e157f4ce8c165da9 (diff)
Wrap a macro's args in parentheses. No binary change.
I'm discussing with deraadt@ whether it's a good idea to convert some of these to functions. The one changed by this commit probably isn't eligible because it defines only a for loop's condition, but many others in less(1) should probably be converted. ok millert@
-rw-r--r--usr.bin/less/ch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/less/ch.c b/usr.bin/less/ch.c
index 86500972b4d..7262ca87932 100644
--- a/usr.bin/less/ch.c
+++ b/usr.bin/less/ch.c
@@ -103,8 +103,8 @@ struct filestate {
* Macros to manipulate the list of buffers in thisfile->hashtbl[n].
*/
#define FOR_BUFS_IN_CHAIN(h, bn) \
- for (bn = thisfile->hashtbl[h].hnext; \
- bn != END_OF_HCHAIN(h); bn = bn->hnext)
+ for ((bn) = thisfile->hashtbl[h].hnext; \
+ (bn) != END_OF_HCHAIN(h); (bn) = (bn)->hnext)
#define BUF_HASH_RM(bn) \
(bn)->hnext->hprev = (bn)->hprev; \