bdev.c: initialize a pointer to avoid build failures with -Werror=maybe-uninitialized

Signed-off-by: Leonid Isaev <lisaev@umail.iu.edu>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Leonid Isaev 2014-06-17 22:21:47 -04:00 committed by Stéphane Graber
parent f44b73e189
commit 08182d4452

View 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)) {