From f5e2277a2e5f9b9126c96321d15bb3697dff2879 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 2 Mar 2012 12:41:23 +0100 Subject: [PATCH] sysctl: print new line explicitely In some cases sysctl does not print new line after the last line. This commit fixes that behavior. Signed-off-by: Sami Kerola --- sysctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysctl.c b/sysctl.c index c27fe022..b6f6fc02 100644 --- a/sysctl.c +++ b/sysctl.c @@ -240,6 +240,8 @@ static int ReadSetting(const char *restrict const name) if (PrintName) { fprintf(stdout, "%s = %s", outname, inbuf); + if (inbuf[strlen(inbuf) - 1] != '\n') + putchar('\n'); } else { if (!PrintNewline) { char *nlptr = -- 2.40.0