summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2016-01-28 19:20:13 -0500
committerRich Felker <dalias@aerifal.cx>2016-01-28 19:20:13 -0500
commitfe8453d2ee128cfcf8777a19659f1c1f19e052ac (patch)
tree07168514f096b28171d97b81cc9cda257dc8fef6 /src/network
parentd6cb08bcaca4ff1f921375510ca72bccea969c75 (diff)
downloadmusl-fe8453d2ee128cfcf8777a19659f1c1f19e052ac.tar.gz
musl-fe8453d2ee128cfcf8777a19659f1c1f19e052ac.tar.bz2
musl-fe8453d2ee128cfcf8777a19659f1c1f19e052ac.tar.xz
musl-fe8453d2ee128cfcf8777a19659f1c1f19e052ac.zip
fix logic for matching search/domain keywords in resolv.conf
Diffstat (limited to 'src/network')
-rw-r--r--src/network/resolvconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/resolvconf.c b/src/network/resolvconf.c
index 0743a88f..7e4dbe21 100644
--- a/src/network/resolvconf.c
+++ b/src/network/resolvconf.c
@@ -69,7 +69,7 @@ int __get_resolv_conf(struct resolvconf *conf, char *search, size_t search_sz)
}
if (!search) continue;
- if (strncmp(line, "domain", 6) || strncmp(line, "search", 6)
+ if ((strncmp(line, "domain", 6) && strncmp(line, "search", 6))
|| !isspace(line[6]))
continue;
for (p=line+7; isspace(*p); p++);