From 796f2ccb74d8e951d549ce39b139d47abfefb87e Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Tue, 2 Apr 2024 11:46:29 +0200 Subject: [PATCH] lxc/confile: do not print newline symbol in getter for lxc.time.offset.* It's clearly a mistake in the getters implementation. Signed-off-by: Alexander Mikhalitsyn --- src/lxc/confile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lxc/confile.c b/src/lxc/confile.c index defb5ed96..d26b3c356 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -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; @@ -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; -- 2.47.2