Skip to content

Commit

Permalink
lxc/confile: do not print newline symbol in getter for lxc.time.offset.*
Browse files Browse the repository at this point in the history
It's clearly a mistake in the getters implementation.

Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Apr 2, 2024
1 parent 41e5d77 commit 7ee9aad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lxc/confile.c
Original file line number Diff line number Diff line change
Expand Up @@ -4726,9 +4726,9 @@ static int get_config_time_offset_boot(const char *key, char *retv, int inlen, s
memset(retv, 0, inlen);

if (c->timens.s_boot) {
strprint(retv, inlen, "%" PRId64 " s\n", c->timens.s_boot);
strprint(retv, inlen, "%" PRId64 " s", c->timens.s_boot);
} else {
strprint(retv, inlen, "%" PRId64 " ns\n", c->timens.ns_boot);
strprint(retv, inlen, "%" PRId64 " ns", c->timens.ns_boot);
}

return fulllen;
Expand All @@ -4746,9 +4746,9 @@ static int get_config_time_offset_monotonic(const char *key, char *retv, int inl
memset(retv, 0, inlen);

if (c->timens.s_monotonic) {
strprint(retv, inlen, "%" PRId64 "s\n", c->timens.s_monotonic);
strprint(retv, inlen, "%" PRId64 "s", c->timens.s_monotonic);
} else {
strprint(retv, inlen, "%" PRId64 "ns\n", c->timens.ns_monotonic);
strprint(retv, inlen, "%" PRId64 "ns", c->timens.ns_monotonic);
}

return fulllen;
Expand Down

0 comments on commit 7ee9aad

Please sign in to comment.