aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index b92a7d9..b91d09b 100644
--- a/conf.c
+++ b/conf.c
@@ -293,7 +293,7 @@ static void get_dns(struct ctx *c)
if ((fd = open("/etc/resolv.conf", O_RDONLY)) < 0)
goto out;
- while (line_read(buf, BUFSIZ, fd)) {
+ while (!(*buf = 0) && line_read(buf, BUFSIZ, fd)) {
if (!dns_set && strstr(buf, "nameserver ") == buf) {
p = strrchr(buf, ' ');
if (!p)