aboutsummaryrefslogtreecommitdiff
path: root/argp/argp-help.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-28 21:56:46 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-28 21:56:46 +0000
commit390500b147a8063ea4be7313ec38cada26f9235a (patch)
treeedf14c04a0a46992ce4c04eeaf604fab99a9d960 /argp/argp-help.c
parentfbb9cc9129ae3efdb1652b175f57956033102876 (diff)
downloadglibc-390500b147a8063ea4be7313ec38cada26f9235a.zip
glibc-390500b147a8063ea4be7313ec38cada26f9235a.tar.gz
glibc-390500b147a8063ea4be7313ec38cada26f9235a.tar.bz2
Update.
1999-04-28 Ulrich Drepper <drepper@cygnus.com> * manager.c (pthread_allocate_stack): Optimize initialization of new thread descriptor.
Diffstat (limited to 'argp/argp-help.c')
-rw-r--r--argp/argp-help.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/argp/argp-help.c b/argp/argp-help.c
index d78060d..f5d96fb 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -1376,19 +1376,17 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state,
if (fdoc)
{
const char *cp = fdoc;
- nl = strchr (cp, '\n');
- if (nl)
+ nl = __strchrnul (cp, '\n');
+ if (*nl != '\0')
/* This is a `multi-level' args doc; advance to the correct position
as determined by our state in LEVELS, and update LEVELS. */
{
int i;
multiple = 1;
for (i = 0; i < *our_level; i++)
- cp = nl + 1, nl = strchr (cp, '\n');
+ cp = nl + 1, nl = __strchrnul (cp, '\n');
(*levels)++;
}
- if (! nl)
- nl = cp + strlen (cp);
/* Manually do line wrapping so that it (probably) won't get wrapped at
any embedded spaces. */