OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8194a2
)
Upstream update
author
Peter S. Mazinger
<ps.m@gmx.net>
Fri, 3 Mar 2006 21:15:02 +0000
(21:15 -0000)
committer
Peter S. Mazinger
<ps.m@gmx.net>
Fri, 3 Mar 2006 21:15:02 +0000
(21:15 -0000)
libc/unistd/getopt_long-susv3.c
patch
|
blob
|
history
diff --git
a/libc/unistd/getopt_long-susv3.c
b/libc/unistd/getopt_long-susv3.c
index
9bae3d8
..
2dae341
100644
(file)
--- a/
libc/unistd/getopt_long-susv3.c
+++ b/
libc/unistd/getopt_long-susv3.c
@@
-17,11
+17,11
@@
static int __getopt_long(int argc, char *const *argv, const char *optstring, con
(argv[optind][1] == '-' && argv[optind][2]))
{
int i;
- char *opt = argv[optind]+2;
for (i=0; longopts[i].name; i++) {
const char *name = longopts[i].name;
+ char *opt = argv[optind]+2;
while (*name && *name++ == *opt++);
- if (*name
&& *opt != '='
) continue;
+ if (*name
|| (*opt && *opt != '=')
) continue;
if (*opt == '=') {
if (!longopts[i].has_arg) continue;
optarg = opt+1;