]> err.no Git - systemd/commitdiff
usb_id: fix NULL string usage
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 26 Feb 2009 19:57:48 +0000 (20:57 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 26 Feb 2009 19:57:48 +0000 (20:57 +0100)
extras/usb_id/usb_id.c

index 92c5f479c3f585cd1712c2e1c05b3ecedff5e017..9ce0cdbe13d54e8ec9a46f183d675a70fb91ab70 100644 (file)
@@ -266,7 +266,7 @@ static int usb_id(struct udev_device *dev)
        dbg(udev, "syspath %s\n", udev_device_get_syspath(dev));
 
        /* shortcut if we are called for a usb_device */
-       if (strcmp(udev_device_get_devtype(dev), "usb_device") == 0) {
+       if (udev_device_get_devtype(dev) != NULL && strcmp(udev_device_get_devtype(dev), "usb_device") == 0) {
                dev_if_packed_info(dev, packed_if_str, sizeof(packed_if_str));
                dev_usb = dev;
                goto fallback;