aboutsummaryrefslogtreecommitdiff
path: root/src/utils/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/getopt.c')
-rw-r--r--src/utils/getopt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/utils/getopt.c b/src/utils/getopt.c
index 5dddf86072a..793415c2afe 100644
--- a/src/utils/getopt.c
+++ b/src/utils/getopt.c
@@ -67,12 +67,12 @@ getopt(nargc, nargv, ostr)
optreset = 0;
if (optind >= nargc || *(place = nargv[optind]) != '-') {
place = EMSG;
- return (-1);
+ return -1;
}
if (place[1] && *++place == '-') { /* found "--" */
++optind;
place = EMSG;
- return (-1);
+ return -1;
}
} /* option letter okay? */
if ((optopt = (int)*place++) == (int)':' ||
@@ -82,13 +82,13 @@ getopt(nargc, nargv, ostr)
* assume it means -1.
*/
if (optopt == (int)'-')
- return (-1);
+ return -1;
if (!*place)
++optind;
if (opterr && *ostr != ':')
(void)fprintf(stderr,
"%s: illegal option -- %c\n", __progname, optopt);
- return (BADCH);
+ return BADCH;
}
if (*++oli != ':') { /* don't need argument */
optarg = NULL;
@@ -101,17 +101,17 @@ getopt(nargc, nargv, ostr)
else if (nargc <= ++optind) { /* no arg */
place = EMSG;
if (*ostr == ':')
- return (BADARG);
+ return BADARG;
if (opterr)
(void)fprintf(stderr,
"%s: option requires an argument -- %c\n",
__progname, optopt);
- return (BADCH);
+ return BADCH;
}
else /* white space */
optarg = nargv[optind];
place = EMSG;
++optind;
}
- return (optopt); /* dump back option letter */
+ return optopt; /* dump back option letter */
}