diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2015-03-31 09:25:51 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2015-03-31 09:26:37 +0100 |
commit | 5e956f114819294e03166e6c66128feb6e0571a2 (patch) | |
tree | 7ea9338f298379e4dcf0288e196ad8dc7c3e8495 /compat/getopt.c | |
parent | 7536d690fdb8859193cdfdd2f68752711425bdd0 (diff) |
Make place const to avoid a warning, from Ben Boeckel.
Diffstat (limited to 'compat/getopt.c')
-rw-r--r-- | compat/getopt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/getopt.c b/compat/getopt.c index a93f368a..03ad9e80 100644 --- a/compat/getopt.c +++ b/compat/getopt.c @@ -52,7 +52,7 @@ char *BSDoptarg; /* argument associated with option */ int BSDgetopt(int nargc, char *const *nargv, const char *ostr) { - static char *place = EMSG; /* option letter processing */ + static const char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (ostr == NULL) @@ -105,7 +105,7 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr) __progname, BSDoptopt); return (BADCH); } - else /* white space */ + else /* white space */ BSDoptarg = nargv[BSDoptind]; place = EMSG; ++BSDoptind; |