aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-21 10:27:06 +0200
committerMattias Andrée <maandree@kth.se>2020-06-21 10:27:06 +0200
commitd63b4e179e05d5dbd114a0a2493f0feb076c6d08 (patch)
treead3da8d938b5cd0d8b90f8504d27a293e7917db3
parentAdd string parameter to _Static_assert use, required by C11 (diff)
downloadsctrace-d63b4e179e05d5dbd114a0a2493f0feb076c6d08.tar.gz
sctrace-d63b4e179e05d5dbd114a0a2493f0feb076c6d08.tar.bz2
sctrace-d63b4e179e05d5dbd114a0a2493f0feb076c6d08.tar.xz
Fix CASE macro: tprintf is returns void, so return in separate statement
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--print.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/print.c b/print.c
index e74fad8..42e80d5 100644
--- a/print.c
+++ b/print.c
@@ -22,7 +22,12 @@
#define CASE(N)\
- if (proc->args[arg_index] == N) return tprintf(proc, "%s", #N)
+ do {\
+ if (proc->args[arg_index] == N) {\
+ tprintf(proc, "%s", #N);\
+ return;\
+ }\
+ } while (0)
#define FLAGS_BEGIN\
do {\