summaryrefslogtreecommitdiff
path: root/lib/getopt.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1995-08-04 15:09:12 +0000
committerJim Meyering <jim@meyering.net>1995-08-04 15:09:12 +0000
commitf7860d6172f8e5d6adacc49736924a4e8775881a (patch)
tree7bb2e659e1e519d59eb0aeffd377a7ad29b2920d /lib/getopt.c
parentf6b3413fcc64bfe4f4a3080d2b1a179bcae00768 (diff)
downloadcoreutils-f7860d6172f8e5d6adacc49736924a4e8775881a.tar.xz
.
Diffstat (limited to 'lib/getopt.c')
-rw-r--r--lib/getopt.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/getopt.c b/lib/getopt.c
index 3cdb1f226..1af2a9629 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -490,6 +490,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
+#ifdef lint
+ indfound = 0; /* Avoid spurious compiler warning. */
+#endif
+
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
@@ -510,13 +514,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
indfound = option_index;
}
else
- {
- /* Second or later nonexact match found. */
- ambig = 1;
-#ifdef lint
- indfound = 0;
-#define
- }
+ /* Second or later nonexact match found. */
+ ambig = 1;
}
if (ambig && !exact)