aboutsummaryrefslogtreecommitdiff
path: root/nss/nsswitch.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nsswitch.c')
-rw-r--r--nss/nsswitch.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 5bce1f5af3..1a6c16e3ae 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -505,7 +505,6 @@ nss_parse_file (const char *fname)
{
name_database_entry *this;
ssize_t n;
- char *cp;
n = __getline (&line, &len, fp);
if (n < 0)
@@ -516,9 +515,7 @@ nss_parse_file (const char *fname)
/* 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')