mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-03 08:22:00 +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:
@ -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,
|
||||||
|
Reference in New Issue
Block a user