]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: use snprintf_ok() 19237/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Apr 2021 13:22:22 +0000 (22:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Apr 2021 16:38:47 +0000 (01:38 +0900)
src/udev/udev-builtin-net_id.c

index f84c2669a85b719e4cf30f9a6ea6f962dce878ba..088bfe38d9ef23d72e8ac1aa61b53f3530d9b4e0 100644 (file)
@@ -999,7 +999,7 @@ static int builtin_net_id(sd_device *dev, int argc, char *argv[], bool test) {
                         udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str);
 
                 if (names.pci_slot[0] &&
-                    snprintf(str, sizeof str, "%s%s%s", prefix, names.pci_slot, names.bcma_core))
+                    snprintf_ok(str, sizeof str, "%s%s%s", prefix, names.pci_slot, names.bcma_core))
                         udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str);
                 return 0;
         }