From: drepper Date: Wed, 28 Apr 1999 22:09:30 +0000 (+0000) Subject: (nscd_parse_file): Use strchrnul. X-Git-Tag: glibc-2_1_1~374 X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=commitdiff_plain;h=c7996421422ae965d19812aad73c3d49f260d952 (nscd_parse_file): Use strchrnul. --- diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index 6ac1677a8b..d31e2bde3a 100644 --- a/nscd/nscd_conf.c +++ b/nscd/nscd_conf.c @@ -63,9 +63,7 @@ nscd_parse_file (const char *fname, struct database dbs[lastdb]) /* Because the file format does not know any form of quoting we can search forward for the next '#' character and if found make it terminating the line. */ - cp = strchr (line, '#'); - if (cp != NULL) - *cp = '\0'; + *strchrnul (line, '#') = '\0'; /* If the line is blank it is ignored. */ if (line[0] == '\0')