summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorMoritz Jodeit <moritz@cvs.openbsd.org>2006-03-13 18:59:33 +0000
committerMoritz Jodeit <moritz@cvs.openbsd.org>2006-03-13 18:59:33 +0000
commitd93e767bb3f3051306e0f311feb475a449c92388 (patch)
tree45ad8f2afdccf7257550adb32745eea28102ac3b /lib/libc/sys
parent3e5b5bc3ed49a190d3e1a0c4d6f34eb2d06f1a6d (diff)
Correctly check for the exit value of getopt(1) and don't
overwrite it with the value from ``set''. ok millert@
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/makelintstub.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/sys/makelintstub.sh b/lib/libc/sys/makelintstub.sh
index 99155dd7554..308bdccbd58 100644
--- a/lib/libc/sys/makelintstub.sh
+++ b/lib/libc/sys/makelintstub.sh
@@ -1,5 +1,5 @@
#!/bin/sh -
-# $OpenBSD: makelintstub.sh,v 1.5 2006/03/12 20:12:14 deraadt Exp $
+# $OpenBSD: makelintstub.sh,v 1.6 2006/03/13 18:59:32 moritz Exp $
# $NetBSD: makelintstub,v 1.2 1997/11/05 05:46:18 thorpej Exp $
#
# Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@@ -152,16 +152,17 @@ trailer()
__EOF__
}
-set -- `getopt no:ps: $*`
-
pflag=NO
nflag=NO
oarg=""
syscallhdr=/usr/include/sys/syscall.h
+args=`getopt no:ps: $*`
if test $? -ne 0; then
usage
fi
+set -- $args
+
for i; do
case "$i" in
-n) nflag=YES; shift;;