about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd_conf.c4
1 files changed, 1 insertions, 3 deletions
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')