mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-19 14:04:17 +03:00
config: avoid printing spaces before end of line
Empty comments were generating unnecessary space char before new line.
This commit is contained in:
parent
74adbec77f
commit
9ae1935b74
@ -1738,7 +1738,7 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
|
|||||||
continue;
|
continue;
|
||||||
commentline[0] = '\0';
|
commentline[0] = '\0';
|
||||||
}
|
}
|
||||||
fprintf(out->fp, "%s# %s\n", line, commentline);
|
fprintf(out->fp, "%s#%s%s\n", line, commentline[0] ? " " : "", commentline);
|
||||||
/* withsummary prints only the first comment line. */
|
/* withsummary prints only the first comment line. */
|
||||||
if (!out->tree_spec->withcomments)
|
if (!out->tree_spec->withcomments)
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user