Make place const to avoid a warning, from Ben Boeckel.

This commit is contained in:
Nicholas Marriott 2015-03-31 09:25:51 +01:00
parent 7536d690fd
commit 5e956f1148

View File

@ -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;