diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2019-01-11 17:25:04 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2019-01-11 17:28:09 -0500 |
commit | dd1829cfd55ad017b0b542f0eb96f5bb1ec38bca (patch) | |
tree | 14bbc5a10d631e8ec584124f1b2c6458e64145d5 /eval.c | |
parent | f8191aea501f5d16197131f35e0190cee3542d60 (diff) | |
download | bfs-dd1829cfd55ad017b0b542f0eb96f5bb1ec38bca.tar.xz |
parse: Allow multiple comma-separated debug flags
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -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. |