]> err.no Git - util-linux/commitdiff
libblkid: cleanup topology fallback
authorKarel Zak <kzak@redhat.com>
Wed, 23 Sep 2009 09:28:28 +0000 (11:28 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 23 Sep 2009 09:28:28 +0000 (11:28 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/topology/dm.c
shlibs/blkid/src/topology/evms.c
shlibs/blkid/src/topology/md.c

index 138c9f4be23d879eb0d1ce3fdca2e17c36d47a74..ac7ce63d862f924386d52c587fb9c5d4fa3ec7ea 100644 (file)
 
 #include "topology.h"
 
-
 static int is_dm_device(dev_t devno)
 {
-       if (blkid_driver_has_major("device-mapper", major(devno)))
-               return 1;
-       return 0;
+       return blkid_driver_has_major("device-mapper", major(devno));
 }
 
 static int probe_dm_tp(blkid_probe pr, const struct blkid_idmag *mag)
index 9f6c48df540d0735a98e6328368952e398fbeffd..7e7969156e091e6f612d80d097d9a004d8c42fa1 100644 (file)
@@ -34,9 +34,7 @@ static int is_evms_device(dev_t devno)
 {
        if (major(devno) == EVMS_MAJOR)
                return 1;
-       if (blkid_driver_has_major("evms", major(devno)))
-               return 1;
-       return 0;
+       return blkid_driver_has_major("evms", major(devno));
 }
 
 static int probe_evms_tp(blkid_probe pr, const struct blkid_idmag *mag)
index e084720f48e78277337988e0da78bb867b6dc430..77116163793072c6036a84e686156663f0ca277b 100644 (file)
@@ -65,9 +65,7 @@ static int is_md_device(dev_t devno)
 {
        if (major(devno) == MD_MAJOR)
                return 1;
-       if (blkid_driver_has_major("md", major(devno)))
-               return 1;
-       return 0;
+       return blkid_driver_has_major("md", major(devno));
 }
 
 static int probe_md_tp(blkid_probe pr, const struct blkid_idmag *mag)