r = sd_device_get_subsystem(parent, &subsystem);
if (r < 0)
return log_device_debug_errno(parent, r, "sd_device_get_subsystem() failed: %m");
- if (!streq("vio", subsystem))
+ if (!streq(subsystem, "vio"))
return -ENOENT;
log_device_debug(dev, "Parent device is in the vio subsystem.");
if (r < 0)
return log_device_debug_errno(parent, r, "sd_device_get_subsystem() failed: %m");
- if (!streq("platform", subsystem))
+ if (!streq(subsystem, "platform"))
return -ENOENT;
log_device_debug(dev, "Parent device is in the platform subsystem.");
/* check if our direct parent is a PCI device with no other bus in-between */
if (sd_device_get_subsystem(parent, &subsystem) >= 0 &&
- streq("pci", subsystem)) {
+ streq(subsystem, "pci")) {
names->type = NET_PCI;
names->pcidev = parent;
} else {
r = sd_device_get_subsystem(parent, &subsystem);
if (r < 0)
return r;
- if (!streq("xen", subsystem))
+ if (!streq(subsystem, "xen"))
return -ENOENT;
/* Use the vif-n name to extract "n" */
return 0;
}
- if (streq_ptr("wlan", info.devtype))
+ if (streq_ptr(info.devtype, "wlan"))
prefix = "wl";
- else if (streq_ptr("wwan", info.devtype))
+ else if (streq_ptr(info.devtype, "wwan"))
prefix = "ww";
udev_builtin_add_property(dev, test, "ID_NET_NAMING_SCHEME", naming_scheme()->name);