]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (topology) init variables for DM
authorKarel Zak <kzak@redhat.com>
Fri, 19 Aug 2022 09:40:27 +0000 (11:40 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 19 Aug 2022 09:41:37 +0000 (11:41 +0200)
Addresses: https://github.com/util-linux/util-linux/issues/1776
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/topology/dm.c

index 1a1cb8ac00c6c6c306038ab3778c480e64ef829f..77146e2e2cdb553cd87296dbbc63d1b1973ebb73 100644 (file)
@@ -34,10 +34,10 @@ static int probe_dm_tp(blkid_probe pr,
                "/usr/sbin/dmsetup",
                "/sbin/dmsetup"
        };
-       int dmpipe[] = { -1, -1 }, stripes, stripesize;
+       int dmpipe[] = { -1, -1 }, stripes = 0, stripesize = 0;
        const char *cmd = NULL;
        FILE *stream = NULL;
-       long long  offset, size;
+       long long  offset = 0, size = 0;
        size_t i;
        dev_t devno = blkid_probe_get_devno(pr);