提交 fe8453d2 编写于 作者: R Rich Felker

fix logic for matching search/domain keywords in resolv.conf

上级 d6cb08bc
......@@ -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++);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册