From 390500b147a8063ea4be7313ec38cada26f9235a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 28 Apr 1999 21:56:46 +0000 Subject: Update. 1999-04-28 Ulrich Drepper * manager.c (pthread_allocate_stack): Optimize initialization of new thread descriptor. --- argp/argp-help.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'argp/argp-help.c') 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. */ -- cgit v1.1