summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2011-12-26 03:14:37 +0000
committerGlen Barber <gjb@FreeBSD.org>2011-12-26 03:14:37 +0000
commitbd45f5676d4ee95d5460a9b62cd346c3e01fc614 (patch)
treea1129ca05bc5db936a19e927de35a04570f75554
parent5b7b8966c152bbe97e8178e7ff0b9cc61c2176d4 (diff)
Notes
-rw-r--r--lib/libc/stdlib/getopt_long.35
-rw-r--r--lib/libc/stdlib/getsubopt.34
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/stdlib/getopt_long.3 b/lib/libc/stdlib/getopt_long.3
index 72f653450b25..06eadca957da 100644
--- a/lib/libc/stdlib/getopt_long.3
+++ b/lib/libc/stdlib/getopt_long.3
@@ -31,7 +31,7 @@
.\" @(#)getopt.3 8.5 (Berkeley) 4/27/95
.\" $FreeBSD$
.\"
-.Dd April 1, 2000
+.Dd December 25, 2011
.Dt GETOPT_LONG 3
.Os
.Sh NAME
@@ -239,7 +239,7 @@ static struct option longopts[] = {
};
bflag = 0;
-while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
+while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) {
switch (ch) {
case 'b':
bflag = 1;
@@ -256,6 +256,7 @@ while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1)
break;
default:
usage();
+ }
}
argc -= optind;
argv += optind;
diff --git a/lib/libc/stdlib/getsubopt.3 b/lib/libc/stdlib/getsubopt.3
index b624eff65eea..86894ebbc8f6 100644
--- a/lib/libc/stdlib/getsubopt.3
+++ b/lib/libc/stdlib/getsubopt.3
@@ -28,7 +28,7 @@
.\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93
.\" $FreeBSD$
.\"
-.Dd June 9, 1993
+.Dd December 25, 2011
.Dt GETSUBOPT 3
.Os
.Sh NAME
@@ -131,9 +131,11 @@ while ((ch = getopt(argc, argv, "ab:")) != \-1) {
else
error("missing sub option");
break;
+ }
}
break;
}
+}
.Ed
.Sh SEE ALSO
.Xr getopt 3 ,