~mcf/cproc

4c697d5087e5f5aaa01bada73396058eed88525d — Michael Forney 1 year, 9 months ago 2b95bd2
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.
1 files changed, 1 insertions(+), 1 deletions(-)

M arg.h
M arg.h => arg.h +1 -1
@@ 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))