]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (dasd) remove unnecessary 'rc' variable
authorKarel Zak <kzak@redhat.com>
Tue, 19 May 2026 08:28:21 +0000 (10:28 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 19 May 2026 08:32:19 +0000 (10:32 +0200)
Return probe results directly instead of storing in an
intermediate variable.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/partitions/dasd.c

index 92044eb222c0129208510b2da4f4867e532b586a..c750a2d84adc20db5f90b1162eb7b639a4ac461d 100644 (file)
@@ -282,7 +282,6 @@ static int probe_dasd_pt(blkid_probe pr,
        const struct dasd_volume_label_cdl *cdl = NULL;
        const struct dasd_volume_label_ldl *ldl = NULL;
        const char *magic;
-       int rc;
        size_t i = 0;
 
        blocksize = blkid_probe_get_sectorsize(pr);
@@ -375,11 +374,9 @@ static int probe_dasd_pt(blkid_probe pr,
        blkid_parttable_set_id(tab, (unsigned char *) volser);
 
        if (is_cdl)
-               rc = probe_dasd_pt_cdl(pr, ls, tab, blocksize);
-       else
-               rc = probe_dasd_pt_ldl(pr, ls, tab, ldl, blocksize);
+               return probe_dasd_pt_cdl(pr, ls, tab, blocksize);
 
-       return rc;
+       return probe_dasd_pt_ldl(pr, ls, tab, ldl, blocksize);
 }
 
 const struct blkid_idinfo dasd_pt_idinfo =