From 82934b7271ad11332cdc291188e6b51e9534c301 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Mon, 13 Nov 2023 13:52:42 +0100 Subject: Fixed clang-tidy warnings. * fixed/improved c-captured logging Signed-off-by: Toni Uhlig --- examples/c-json-stdout/c-json-stdout.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'examples/c-json-stdout') diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c index ae082a366..a80369c82 100644 --- a/examples/c-json-stdout/c-json-stdout.c +++ b/examples/c-json-stdout/c-json-stdout.c @@ -90,8 +90,7 @@ int main(void) break; } - if (buf[json_bytes - 2] != '}' || - buf[json_bytes - 1] != '\n') + if (buf[json_bytes - 2] != '}' || buf[json_bytes - 1] != '\n') { fprintf(stderr, "BUG: Invalid JSON string: \"%.*s\"\n", (int)json_bytes, buf); exit(1); @@ -129,8 +128,6 @@ int main(void) memmove(buf, buf + json_bytes, buf_used - json_bytes); buf_used -= json_bytes; - json_bytes = 0; - json_start = 0; } } -- cgit v1.2.3