summaryrefslogtreecommitdiff
path: root/examples/c-json-stdout/c-json-stdout.c
diff options
context:
space:
mode:
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;
}
}