summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-01-11 17:25:04 -0500
committerTavian Barnes <tavianator@tavianator.com>2019-01-11 17:28:09 -0500
commitdd1829cfd55ad017b0b542f0eb96f5bb1ec38bca (patch)
tree14bbc5a10d631e8ec584124f1b2c6458e64145d5 /eval.c
parentf8191aea501f5d16197131f35e0190cee3542d60 (diff)
downloadbfs-dd1829cfd55ad017b0b542f0eb96f5bb1ec38bca.tar.xz
parse: Allow multiple comma-separated debug flags
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/eval.c b/eval.c
index 37f8bf5..84e68c2 100644
--- a/eval.c
+++ b/eval.c
@@ -96,14 +96,16 @@ static void eval_report_error(struct eval_state *state) {
}
}
-#define DEBUG_FLAG(flags, flag) \
- if ((flags & flag) || flags == flag) { \
- fputs(#flag, stderr); \
- flags ^= flag; \
- if (flags) { \
- fputs(" | ", stderr); \
- } \
- }
+#define DEBUG_FLAG(flags, flag) \
+ do { \
+ if ((flags & flag) || flags == flag) { \
+ fputs(#flag, stderr); \
+ flags ^= flag; \
+ if (flags) { \
+ fputs(" | ", stderr); \
+ } \
+ } \
+ } while (0)
/**
* Debug stat() calls.