diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-09-10 15:20:16 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-09-10 15:20:16 -0700 |
| commit | 1077acf7c81d9d1e0f0b89479de15d9ce4cf89da (patch) | |
| tree | 74b8d4af5f4701281f3cbb974c1bdecc1039c8d2 | |
| parent | 3de049723937a79e0c12c7d0fe48e5a7db0164d5 (diff) | |
| download | nng-1077acf7c81d9d1e0f0b89479de15d9ce4cf89da.tar.gz nng-1077acf7c81d9d1e0f0b89479de15d9ce4cf89da.tar.bz2 nng-1077acf7c81d9d1e0f0b89479de15d9ce4cf89da.zip | |
fixes #715 nng_opts_parse() uses const incorrectly
| -rw-r--r-- | docs/man/nng_opts_parse.3supp.adoc | 2 | ||||
| -rw-r--r-- | src/supplemental/util/options.c | 2 | ||||
| -rw-r--r-- | src/supplemental/util/options.h | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/docs/man/nng_opts_parse.3supp.adoc b/docs/man/nng_opts_parse.3supp.adoc index 048f992f..20a52109 100644 --- a/docs/man/nng_opts_parse.3supp.adoc +++ b/docs/man/nng_opts_parse.3supp.adoc @@ -27,7 +27,7 @@ typedef struct nng_optspec { bool o_arg; // Option takes an argument if true } nng_optspec; -int nng_opts_parse(int argc, const char **argv, const nng_optspec *spec, int *val, const char **arg, int *idx); +int nng_opts_parse(int argc, char *const *argv, const nng_optspec *spec, int *val, const char **arg, int *idx); ---- == DESCRIPTION diff --git a/src/supplemental/util/options.c b/src/supplemental/util/options.c index a8cc969d..c1881185 100644 --- a/src/supplemental/util/options.c +++ b/src/supplemental/util/options.c @@ -16,7 +16,7 @@ // Call with optidx set to 1 to start parsing. int -nng_opts_parse(int argc, const char **argv, const nng_optspec *opts, int *val, +nng_opts_parse(int argc, char *const *argv, const nng_optspec *opts, int *val, const char **optarg, int *optidx) { const nng_optspec *opt; diff --git a/src/supplemental/util/options.h b/src/supplemental/util/options.h index 00cf1351..392c4a53 100644 --- a/src/supplemental/util/options.h +++ b/src/supplemental/util/options.h @@ -38,7 +38,7 @@ typedef struct nng_optspec nng_optspec; // set to match the option string, and optidx will be increment appropriately. // Returns -1 when the end of options is reached, 0 on success, or // NNG_EINVAL if the option parse is invalid for any reason. -NNG_DECL int nng_opts_parse(int argc, const char **argv, +NNG_DECL int nng_opts_parse(int argc, char *const *argv, const nng_optspec *opts, int *val, const char **optarg, int *optidx); #ifdef __cplusplus |
