1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

export: typo with buffer zeroing

Lost '= 0' in cut & paste.
Also get rid of no longer needed 'goto' section.
This commit is contained in:
Zdenek Kabelac 2024-10-23 19:21:05 +02:00
parent ea39c58127
commit 1f0530919e

View File

@ -394,22 +394,19 @@ static char *_alloc_printed_str_list(struct dm_list *list)
return NULL;
}
buffer[0];
buffer[0] = 0;
dm_list_iterate_items(sl, list) {
if (!emit_to_buffer(&buf, &size, "%s\"%s\"",
(!first) ? ", " : "",
sl->str))
goto_bad;
sl->str)) {
free(buffer);
return_NULL;
}
first = 0;
}
return buffer;
bad:
free(buffer);
return_NULL;
}
static int _out_list(struct formatter *f, struct dm_list *list,