summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-17 11:29:57 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-17 11:45:55 +0100
commitbe0586610ebe651ceec15649d1ac2b2fe096eb3b (patch)
treeae638b980fba5b699c68f489b87e32426c7ebfd6 /src/udev
parenta2968e83668fc290d797a4566a1b0e74ad5c3e9a (diff)
downloadsystemd-be0586610ebe651ceec15649d1ac2b2fe096eb3b.tar.gz
udev/net_id: fix signedness in format string
Both variables are unsigned. In practice those numbers cannot be large enough to become negative, but let's use the correct type anyway.
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/udev-builtin-net_id.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index 4d16591750..4ca826b58e 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -443,10 +443,10 @@ static int dev_pci_slot(sd_device *dev, const LinkInfo *info, NetNames *names) {
s = names->pci_slot;
l = sizeof(names->pci_slot);
if (domain > 0)
- l = strpcpyf(&s, l, "P%d", domain);
+ l = strpcpyf(&s, l, "P%u", domain);
l = strpcpyf(&s, l, "s%"PRIu32, hotplug_slot);
if (func > 0 || is_pci_multifunction(names->pcidev))
- l = strpcpyf(&s, l, "f%d", func);
+ l = strpcpyf(&s, l, "f%u", func);
if (!isempty(info->phys_port_name))
l = strpcpyf(&s, l, "n%s", info->phys_port_name);
else if (dev_port > 0)