summaryrefslogtreecommitdiff
path: root/examples/c-json-stdout
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-01-27 17:53:18 +0100
committerToni Uhlig <matzeton@googlemail.com>2021-01-27 18:05:13 +0100
commit257cce1dccb19190ebcb4c48bac421a21daa4a56 (patch)
tree97de2a779654101691458573d7ed32b5a9cea1ab /examples/c-json-stdout
parent9564b0ce2c239b02235414d908829fff9c684a8c (diff)
Fixed braindead failure - Increase of NETWORK_BUFFER_MAX_SIZE > 9999 means to also increase NETWORK_BUFFER_LENGTH_DIGITS to 5.
* Fixed ARM32 xcompile warnings; Other GCC versions, other uint64_t's.. * Replaced ridiculous nDPIsrvd_JSON_BYTES with NETWORK_BUFFER_LENGTH_DIGITS. 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c
index e17f16a1c..7265feec1 100644
--- a/examples/c-json-stdout/c-json-stdout.c
+++ b/examples/c-json-stdout/c-json-stdout.c
@@ -57,11 +57,11 @@ int main(void)
}
buf_used += bytes_read;
- while (buf_used >= nDPIsrvd_JSON_BYTES + 1)
+ while (buf_used >= NETWORK_BUFFER_LENGTH_DIGITS + 1)
{
- if (buf[nDPIsrvd_JSON_BYTES] != '{')
+ if (buf[NETWORK_BUFFER_LENGTH_DIGITS] != '{')
{
- fprintf(stderr, "BUG: JSON invalid opening character: '%c'\n", buf[nDPIsrvd_JSON_BYTES]);
+ fprintf(stderr, "BUG: JSON invalid opening character: '%c'\n", buf[NETWORK_BUFFER_LENGTH_DIGITS]);
exit(1);
}
@@ -77,7 +77,7 @@ int main(void)
}
if ((uint8_t *)json_str_start == buf)
{
- fprintf(stderr, "BUG: Missing size before JSON string: \"%.*s\"\n", nDPIsrvd_JSON_BYTES, buf);
+ fprintf(stderr, "BUG: Missing size before JSON string: \"%.*s\"\n", NETWORK_BUFFER_LENGTH_DIGITS, buf);
exit(1);
}
if (json_bytes > sizeof(buf))