eeze_disk - remove redundant if check already done
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 29 Jul 2017 01:40:33 +0000 (10:40 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 29 Jul 2017 01:56:53 +0000 (10:56 +0900)
removes redundant fi check. not a bug but analysers dont like it and
it is redundant

found by PVS studio

src/lib/eeze/eeze_disk.c

index d1c77b4..60c4fa7 100644 (file)
@@ -296,11 +296,11 @@ eeze_disk_scan(Eeze_Disk *disk)
    if (!disk->cache.vendor)
      disk->cache.vendor = udev_device_get_property_value(disk->device, "ID_VENDOR");
    if (!disk->cache.vendor)
-     if (!disk->cache.vendor) disk->cache.vendor = udev_device_get_sysattr_value(disk->device, "vendor");
+     disk->cache.vendor = udev_device_get_sysattr_value(disk->device, "vendor");
    if (!disk->cache.model)
      disk->cache.model = udev_device_get_property_value(disk->device, "ID_MODEL");
    if (!disk->cache.model)
-     if (!disk->cache.model) disk->cache.model = udev_device_get_sysattr_value(disk->device, "model");
+     disk->cache.model = udev_device_get_sysattr_value(disk->device, "model");
    if (!disk->cache.serial)
      disk->cache.serial = udev_device_get_property_value(disk->device, "ID_SERIAL_SHORT");
    if (!disk->cache.uuid)