OSDN Git Service

Temporary hack in get_partition_number
authorPeter Jones <pjones@redhat.com>
Wed, 6 Jun 2018 20:30:08 +0000 (16:30 -0400)
committerPeter Jones <pmjones@gmail.com>
Fri, 8 Jun 2018 19:11:37 +0000 (15:11 -0400)
This code has been wrong for a while, but it's getting removed, so
really don't bother *fixing* it so much as appeasing newer gcc's
noticing that it's uninitialized.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/linux.c

index 0b35b77..abb841f 100644 (file)
@@ -127,7 +127,7 @@ get_partition_number(const char *devpath)
        int rc;
        unsigned int maj, min;
        char *linkbuf;
-       uint8_t *partbuf;
+       uint8_t *partbuf = NULL; /* XXX this is wrong and the code below will be wrong */
        int ret = -1;
 
        rc = stat(devpath, &statbuf);