]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized
authorLeonid Isaev <lisaev@umail.iu.edu>
Wed, 18 Jun 2014 02:21:47 +0000 (22:21 -0400)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 18 Jun 2014 02:57:56 +0000 (22:57 -0400)
Signed-off-by: Leonid Isaev <lisaev@umail.iu.edu>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/bdev.c

index c0051e63e89561ceab9e49642221285d6921d9a3..2ed0b96a2679680773658a2a87c41ddf13d71244 100644 (file)
@@ -3097,7 +3097,7 @@ struct bdev *bdev_create(const char *dest, const char *type,
 
        // -B lvm,dir
        if (index(type, ',') != NULL) {
-               char *dup = alloca(strlen(type)+1), *saveptr, *token;
+               char *dup = alloca(strlen(type)+1), *saveptr = NULL, *token;
                strcpy(dup, type);
                for (token = strtok_r(dup, ",", &saveptr); token;
                                token = strtok_r(NULL, ",", &saveptr)) {