Commit 7ef2c07c by Leonid Isaev Committed by Stéphane Graber

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

parent 9f38aea2
......@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment