aboutsummaryrefslogtreecommitdiff
path: root/examples/c-json-stdout/c-json-stdout.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-11-13 13:52:42 +0100
committerToni Uhlig <matzeton@googlemail.com>2023-11-13 13:52:42 +0100
commit82934b7271ad11332cdc291188e6b51e9534c301 (patch)
tree6f48d177a1a047878c54db75b9945aa0e3242eea /examples/c-json-stdout/c-json-stdout.c
parent4920b2a4be62b85b6355278fe0d63637bddb624f (diff)
Fixed clang-tidy warnings.
* fixed/improved c-captured logging Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-json-stdout/c-json-stdout.c')
-rw-r--r--examples/c-json-stdout/c-json-stdout.c5
1 files changed, 1 insertions, 4 deletions
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;
}
}