diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 21:35:20 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-10 21:35:26 +0530 |
commit | f742dcd82123f180d04b5282402c3e06d3e8a3d1 (patch) | |
tree | 7f3acbca8eb10b2069d1ebfce6c44db108499c96 /include | |
parent | 0a5cf111b39710579dcdac609c9c1af6a1d19a69 (diff) |
c: wrap multi line macros inside do while
https://man.openbsd.org/style
Diffstat (limited to 'include')
-rw-r--r-- | include/util.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/util.h b/include/util.h index e19dbe8..8d735bb 100644 --- a/include/util.h +++ b/include/util.h @@ -1,6 +1,7 @@ #include <stdio.h> -#define err_ret(r, fmt, ...) {\ - fprintf(stderr, "[%s:%d] " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \ - return r; \ -} +#define err_ret(r, fmt, ...) do { \ + fprintf(stderr, "[%s:%d] " fmt "\n", \ + __FILE__, __LINE__, ##__VA_ARGS__); \ + return r; \ +} while (0) |