aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/supplemental/util/options.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/supplemental/util/options.c b/src/supplemental/util/options.c
index 826a3692..711635e2 100644
--- a/src/supplemental/util/options.c
+++ b/src/supplemental/util/options.c
@@ -23,12 +23,13 @@ nng_opts_parse(int argc, char *const *argv, const nng_optspec *opts, int *val,
int matches;
bool shortopt;
size_t l;
- char * arg = argv[*optidx];
+ char * arg;
int i;
if ((i = *optidx) >= argc) {
return (-1);
}
+ arg = argv[*optidx];
if (arg[0] != '-') {
return (-1);