diff options
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/nscd_conf.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/nscd/nscd_conf.c b/nscd/nscd_conf.c index 6ac1677..d31e2bd 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') |