From: Zbigniew Jędrzejewski-Szmek Date: Fri, 17 Dec 2021 10:29:57 +0000 (+0100) Subject: udev/net_id: fix signedness in format string X-Git-Tag: v250-rc3~22^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be0586610ebe651ceec15649d1ac2b2fe096eb3b;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 4d165917509..4ca826b58e0 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)