diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-04-15 08:20:22 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-05-03 14:37:51 -0400 |
commit | cb0e80578d19677ce596e0b80f0e5725836d8972 (patch) | |
tree | ec8830025f037604c4d7827c6434842c9bb7ccb8 /src/udev/udev-builtin-usb_id.c | |
parent | d382c64fad37273a4a91e5c45f485132e7de211a (diff) |
udev-builtin-usb_id: fix inverted condition
Fix for 4beac74e69.
Thanks, Ronny!
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udev-builtin-usb_id.c')
-rw-r--r-- | src/udev/udev-builtin-usb_id.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c index 9418a6b850..462efc5c86 100644 --- a/src/udev/udev-builtin-usb_id.c +++ b/src/udev/udev-builtin-usb_id.c @@ -430,10 +430,10 @@ fallback: s = serial; l = strpcpyl(&s, sizeof(serial), vendor_str, "_", model_str, NULL); - if (isempty(serial_str)) + if (!isempty(serial_str)) l = strpcpyl(&s, l, "_", serial_str, NULL); - if (isempty(instance_str)) + if (!isempty(instance_str)) strpcpyl(&s, l, "-", instance_str, NULL); udev_builtin_add_property(dev, test, "ID_VENDOR", vendor_str); @@ -444,14 +444,14 @@ fallback: udev_builtin_add_property(dev, test, "ID_MODEL_ID", product_id); udev_builtin_add_property(dev, test, "ID_REVISION", revision_str); udev_builtin_add_property(dev, test, "ID_SERIAL", serial); - if (isempty(serial_str)) + if (!isempty(serial_str)) udev_builtin_add_property(dev, test, "ID_SERIAL_SHORT", serial_str); - if (isempty(type_str)) + if (!isempty(type_str)) udev_builtin_add_property(dev, test, "ID_TYPE", type_str); - if (isempty(instance_str)) + if (!isempty(instance_str)) udev_builtin_add_property(dev, test, "ID_INSTANCE", instance_str); udev_builtin_add_property(dev, test, "ID_BUS", "usb"); - if (isempty(packed_if_str)) + if (!isempty(packed_if_str)) udev_builtin_add_property(dev, test, "ID_USB_INTERFACES", packed_if_str); if (ifnum != NULL) udev_builtin_add_property(dev, test, "ID_USB_INTERFACE_NUM", ifnum); |