mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-07 02:08:40 +00:00
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:
parent
f44b73e189
commit
08182d4452
@ -3097,7 +3097,7 @@ struct bdev *bdev_create(const char *dest, const char *type,
|
|||||||
|
|
||||||
// -B lvm,dir
|
// -B lvm,dir
|
||||||
if (index(type, ',') != NULL) {
|
if (index(type, ',') != NULL) {
|
||||||
char *dup = alloca(strlen(type)+1), *saveptr, *token;
|
char *dup = alloca(strlen(type)+1), *saveptr = NULL, *token;
|
||||||
strcpy(dup, type);
|
strcpy(dup, type);
|
||||||
for (token = strtok_r(dup, ",", &saveptr); token;
|
for (token = strtok_r(dup, ",", &saveptr); token;
|
||||||
token = strtok_r(NULL, ",", &saveptr)) {
|
token = strtok_r(NULL, ",", &saveptr)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user