]> 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:58:12 +0000 (22:58 -0400)
Signed-off-by: Leonid Isaev <lisaev@umail.iu.edu>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/bdev.c

index 0d55c9dcfce05e4c15123611a5f1abc0ccbde9f6..d66f19d0495f083bad1943825f464ecfd6b720d0 100644 (file)
@@ -2785,7 +2785,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)) {