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

Make it possible to represent type-correct single-item arrays in config trees.

This commit is contained in:
Petr Rockai 2011-07-19 19:12:38 +00:00
parent cc6032956f
commit 0a305e9666

View File

@ -486,11 +486,11 @@ static int _write_config(const struct config_node *n, int only_one,
line_append("=");
if (v->next) {
line_append("[");
while (v) {
while (v && v->type != CFG_EMPTY_ARRAY) {
if (!_write_value(outline, v))
return_0;
v = v->next;
if (v)
if (v && v->type != CFG_EMPTY_ARRAY)
line_append(", ");
}
line_append("]");