diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-01-21 21:51:20 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-01-22 15:30:37 +0100 |
commit | 9ae1935b74cc2336a19bcaee8703f6d22d1ee837 (patch) | |
tree | 1d9d2d8141398a6bb1849d00e26b7bb9b2432e99 /lib/config | |
parent | 74adbec77f77cd725bbac7ab3f3fb964d8b1e1f0 (diff) | |
download | lvm2-9ae1935b74cc2336a19bcaee8703f6d22d1ee837.tar.gz |
config: avoid printing spaces before end of line
Empty comments were generating unnecessary space char before new line.
Diffstat (limited to 'lib/config')
-rw-r--r-- | lib/config/config.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/config/config.c b/lib/config/config.c index a25b7db6e..f9ca56677 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -1738,7 +1738,7 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi continue; 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. */ if (!out->tree_spec->withcomments) break; |