mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-15 19:13:10 +00:00
sensors: json: Skip printing an unnecessary newline
Don't print a newline if no features were printed. This is based on a patch from the su8 user on GitHub. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
1 parent
1020728a96
commit
50f227dafe
1 file changed
+2
-1
@@ -112,7 +112,8 @@ void print_chip_json(const sensors_chip_name *name)
|
||||
printf("\n }");
|
||||
cnt++;
|
||||
}
|
||||
printf("\n");
|
||||
if (cnt > 0)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static const char hyst_str[] = "hyst";
|
||||
|
||||
Reference in new issue
Block a user