mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
The attached patch optimizes the validation of the name of an interface.
This commit is contained in:
parent
8459218cbc
commit
d9292cfefb
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user