summaryrefslogtreecommitdiff
path: root/examples/c-json-stdout
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-08-14 17:33:52 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-08-14 17:40:02 +0200
commitbe4366b0e1a51ce0caab5e4d88a61d9c5fc9583e (patch)
tree2eeab805dc5b2379452d34c1b705a7ec1549980d /examples/c-json-stdout
parenta5f8783bda10fe444bd70f61e404a21b226d82f7 (diff)
several fixes and improvments
- set errno to 0 if it is checked right after a libc call - ignore SIGPIPE as we want to avoid signal handling where possible - fixed another issue in nDPIsrvd/c-json-stdout which caused buffering errors Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-json-stdout')
-rw-r--r--examples/c-json-stdout/c-json-stdout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c
index 183d072ee..83af9d12d 100644
--- a/examples/c-json-stdout/c-json-stdout.c
+++ b/examples/c-json-stdout/c-json-stdout.c
@@ -61,7 +61,7 @@ int main(void)
}
buf_used += bytes_read;
- while (json_bytes == 0 && buf_used >= nDPIsrvd_JSON_BYTES + 1)
+ while (buf_used >= nDPIsrvd_JSON_BYTES + 1)
{
if (buf[nDPIsrvd_JSON_BYTES] != '{')
{