]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: ignore empty SR-IOV VF suffix
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 12 May 2022 23:54:44 +0000 (08:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 5 Aug 2022 12:49:27 +0000 (21:49 +0900)
It should not happen. Just for safety.

src/udev/udev-builtin-net_id.c

index 63280440993f561b43bfe2a801131533de2275b7..45387b2bdbedee88e8901a3cca0cd491fb9b5bef 100644 (file)
@@ -126,7 +126,7 @@ static int get_virtfn_info(sd_device *pcidev, sd_device **ret_physfn_pcidev, cha
                 const char *n, *s;
 
                 n = startswith(de->d_name, "virtfn");
-                if (!n)
+                if (isempty(n))
                         continue;
 
                 if (sd_device_new_child(&virtfn_pcidev, physfn_pcidev, de->d_name) < 0)