X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fudev%2Fudev-builtin-net_id.c;h=fdbec5ae916872b7ba380355493f850cf41091b4;hb=a50d7d4389217c0d3b527ee260eabf89e4a76caa;hp=c55c34d614037c53136350118bf1ef282b73326b;hpb=641906e9366891e0ad3e6e38b7396a427678c4cf;p=elogind.git diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index c55c34d61..fdbec5ae9 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -91,6 +91,7 @@ #include #include "udev.h" +#include "fileio.h" enum netname_type{ NET_UNDEF, @@ -255,7 +256,7 @@ static int names_pci(struct udev_device *dev, struct netnames *names) { if (!parent) return -ENOENT; /* check if our direct parent is a PCI device with no other bus in-between */ - if (streq("pci", udev_device_get_subsystem(parent))) { + if (streq_ptr("pci", udev_device_get_subsystem(parent))) { names->type = NET_PCI; names->pcidev = parent; } else { @@ -413,7 +414,7 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool p = udev_device_get_sysattr_value(dev, "iflink"); if (!p) return EXIT_FAILURE; - if (strcmp(s, p) != 0) + if (!streq(s, p)) return 0; devtype = udev_device_get_devtype(dev);