diff options
author | Michael Forney <mforney@mforney.org> | 2019-04-05 20:02:26 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2019-04-06 12:01:51 -0700 |
commit | 4c697d5087e5f5aaa01bada73396058eed88525d (patch) | |
tree | f6ab372f390bcc83684282cdea1743daebeb6fd5 | |
parent | 2b95bd2fe11ac8e982fc88d42661bd5cf3f6e475 (diff) | |
download | cproc-4c697d5087e5f5aaa01bada73396058eed88525d.tar.xz |
arg: Use (void *)0 instead of NULL in error case of conditional expression
Even though NULL is a null pointer constant, the comma expression with
NULL at the end is not. So, we must ensure that either the type of the
comma expression is `char *` or `void *`, and we don't know this for NULL.
-rw-r--r-- | arg.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -15,4 +15,4 @@ } #define EARGF(x) \ - (done_ = 1, *++opt_ ? opt_ : argv[1] ? --argc, *++argv : ((x), abort(), NULL)) + (done_ = 1, *++opt_ ? opt_ : argv[1] ? --argc, *++argv : ((x), abort(), (void *)0)) |