From 08182d4452a87a0b258dd5b7edc20aa62914f869 Mon Sep 17 00:00:00 2001 From: Leonid Isaev Date: Tue, 17 Jun 2014 22:21:47 -0400 Subject: [PATCH] bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Leonid Isaev Acked-by: Stéphane Graber --- src/lxc/bdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c index c0051e63e..2ed0b96a2 100644 --- a/src/lxc/bdev.c +++ b/src/lxc/bdev.c @@ -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)) {