提交 d9292cfe 编写于 作者: S Stefan Berger

The attached patch optimizes the validation of the name of an interface.

上级 8459218c
......@@ -1795,7 +1795,7 @@ cleanup:
static bool
isValidIfname(const char *ifname) {
return (strspn(ifname, VALID_IFNAME_CHARS) == strlen(ifname));
return ifname[strspn(ifname, VALID_IFNAME_CHARS)] == 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册