mirror of
https://github.com/fluencelabs/musl
synced 2025-05-19 18:51:30 +00:00
fix logic for matching search/domain keywords in resolv.conf
This commit is contained in:
parent
d6cb08bcac
commit
fe8453d2ee
@ -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++);
|
||||
|
Loading…
x
Reference in New Issue
Block a user