projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
install-reloc: Support multi-binary installation.
[gnulib.git]
/
lib
/
getsubopt.c
diff --git
a/lib/getsubopt.c
b/lib/getsubopt.c
index
f29f359
..
539fdd0
100644
(file)
--- a/
lib/getsubopt.c
+++ b/
lib/getsubopt.c
@@
-1,5
+1,6
@@
/* Parse comma separated list into words.
/* Parse comma separated list into words.
- Copyright (C) 1996, 1997, 1999, 2004, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1996-1997, 1999, 2004, 2007, 2009-2013 Free Software
+ Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@
-58,16
+59,16
@@
getsubopt (char **optionp, char *const *tokens, char **valuep)
one of the TOKENS. */
for (cnt = 0; tokens[cnt] != NULL; ++cnt)
if (strncmp (*optionp, tokens[cnt], vstart - *optionp) == 0
one of the TOKENS. */
for (cnt = 0; tokens[cnt] != NULL; ++cnt)
if (strncmp (*optionp, tokens[cnt], vstart - *optionp) == 0
- && tokens[cnt][vstart - *optionp] == '\0')
+
&& tokens[cnt][vstart - *optionp] == '\0')
{
{
- /* We found the current option in TOKENS. */
- *valuep = vstart != endp ? vstart + 1 : NULL;
+
/* We found the current option in TOKENS. */
+
*valuep = vstart != endp ? vstart + 1 : NULL;
- if (*endp != '\0')
- *endp++ = '\0';
- *optionp = endp;
+
if (*endp != '\0')
+
*endp++ = '\0';
+
*optionp = endp;
- return cnt;
+
return cnt;
}
/* The current suboption does not match any option. */
}
/* The current suboption does not match any option. */