summaryrefslogtreecommitdiff
path: root/stdlib/getsubopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/getsubopt.c')
-rw-r--r--stdlib/getsubopt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/stdlib/getsubopt.c b/stdlib/getsubopt.c
index ecdc1edce9..d559d9077f 100644
--- a/stdlib/getsubopt.c
+++ b/stdlib/getsubopt.c
@@ -41,9 +41,7 @@ getsubopt (optionp, tokens, valuep)
return -1;
/* Find end of next token. */
- endp = strchr (*optionp, ',');
- if (endp == NULL)
- endp = strchr (*optionp, '\0');
+ endp = __strchrnul (*optionp, ',');
/* Find start of value. */
vstart = memchr (*optionp, '=', endp - *optionp);