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:
parent
ea39c58127
commit
1f0530919e
@ -394,22 +394,19 @@ static char *_alloc_printed_str_list(struct dm_list *list)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer[0];
|
buffer[0] = 0;
|
||||||
|
|
||||||
dm_list_iterate_items(sl, list) {
|
dm_list_iterate_items(sl, list) {
|
||||||
if (!emit_to_buffer(&buf, &size, "%s\"%s\"",
|
if (!emit_to_buffer(&buf, &size, "%s\"%s\"",
|
||||||
(!first) ? ", " : "",
|
(!first) ? ", " : "",
|
||||||
sl->str))
|
sl->str)) {
|
||||||
goto_bad;
|
free(buffer);
|
||||||
|
return_NULL;
|
||||||
|
}
|
||||||
first = 0;
|
first = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return buffer;
|
return buffer;
|
||||||
|
|
||||||
bad:
|
|
||||||
free(buffer);
|
|
||||||
return_NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _out_list(struct formatter *f, struct dm_list *list,
|
static int _out_list(struct formatter *f, struct dm_list *list,
|
||||||
|
Loading…
Reference in New Issue
Block a user