Fixed clang-tidy warnings.

* fixed/improved c-captured logging

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
Toni Uhlig
2023-11-13 13:52:42 +01:00
parent 4920b2a4be
commit 82934b7271
5 changed files with 19 additions and 18 deletions

View File

@@ -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;
}
}