summaryrefslogtreecommitdiff
path: root/resolv/res_hconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res_hconf.c')
-rw-r--r--resolv/res_hconf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index 06306f7726..ab49ccf9d6 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -334,9 +334,7 @@ _res_hconf_init (void)
while (fgets_unlocked (buf, sizeof (buf), fp))
{
++line_num;
- end = strchr (buf, '\n');
- if (end)
- *end = '\0';
+ *__strchrnul (buf, '\n') = '\0';
parse_line (hconf_name, line_num, buf);
}
fclose (fp);