From 257cce1dccb19190ebcb4c48bac421a21daa4a56 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Wed, 27 Jan 2021 17:53:18 +0100 Subject: 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 --- examples/c-json-stdout/c-json-stdout.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/c-json-stdout/c-json-stdout.c') 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)) -- cgit v1.2.3