summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-04-15 08:20:22 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-04-15 08:28:19 -0400
commit38b9855bfa28d1a7c8e0a629187147d79ffdaf6b (patch)
tree2fa6e99c73915ae221198581058ed3cd50e6d1b9
parent17af49f24812a6dd1b3f0732e33ea5dae9e32b29 (diff)
udev-builtin-usb_id: fix inverted condition
Fix for 4beac74e69. Thanks, Ronny!
-rw-r--r--src/udev/udev-builtin-usb_id.c12
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);