diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-08-04 17:29:31 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-08-04 17:29:31 +0200 |
commit | 8a6021268e83b8712acc8d73ab2f4073ee402245 (patch) | |
tree | dd728aa0467fbc218e5c7d3d5807f2f3d6bdfb13 /examples/c-json-stdout | |
parent | 823b95828c7a3321e4375ddee858e3a44ad1cd4c (diff) |
introduced NETWORK_BUFFER_MAX_SIZE to replace BUFSIZ as this might change depending on the arch/libc used
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c index c58ef6907..ff84a6411 100644 --- a/examples/c-json-stdout/c-json-stdout.c +++ b/examples/c-json-stdout/c-json-stdout.c @@ -16,7 +16,7 @@ int main(void) int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in remote_addr = {}; socklen_t remote_addrlen = sizeof(remote_addr); - uint8_t buf[BUFSIZ]; + uint8_t buf[NETWORK_BUFFER_MAX_SIZE]; //size_t buf_used = 0; //unsigned long long int buf_wanted = 0; @@ -45,7 +45,7 @@ int main(void) break; } - printf("RECV[%zd]: '%.*s'\n", bytes_read, (int) bytes_read, buf); + printf("RECV[%zd]: '%.*s'\n\n", bytes_read, (int) bytes_read, buf); } return 0; |