aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-06 15:30:26 -0700
committerMichael Forney <mforney@mforney.org>2019-07-06 15:31:22 -0700
commit347b7d0aaaf790df992340525cae076d35d3f27e (patch)
treef193fb62d53f1b66a445be442be50453bfaf6a8f
parentd5e382dd04848349ebf115ac779149af5590ed35 (diff)
downloadcproc-347b7d0aaaf790df992340525cae076d35d3f27e.tar.xz
Minor tweaks to arg.h
Make sure EARGF() has type `char *` (rather than `void *`). Only advance opt_ when there is more left in the argument.
-rw-r--r--arg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arg.h b/arg.h
index d428660..6a3f112 100644
--- a/arg.h
+++ b/arg.h
@@ -15,4 +15,4 @@
}
#define EARGF(x) \
- (done_ = 1, *++opt_ ? opt_ : argv[1] ? --argc, *++argv : ((x), abort(), (void *)0))
+ (done_ = 1, opt_[1] ? ++opt_ : argv[1] ? --argc, *++argv : ((x), abort(), (char *)0))