We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa589ae commit b58eceeCopy full SHA for b58ecee
examples/udp/udp_server.c
@@ -168,10 +168,10 @@ void udp_server(void)
168
ntohs(client.sin6_port));
169
#else
170
tmpaddr = ntohl(client.sin_addr.s_addr);
171
- printf("server: %d. Received %d bytes from %d.%d.%d.%d:%d\n",
+ printf("server: %d. Received %d bytes from %u.%u.%u.%u:%d\n",
172
offset, nbytes,
173
- tmpaddr >> 24, (tmpaddr >> 16) & 0xff,
174
- (tmpaddr >> 8) & 0xff, tmpaddr & 0xff,
+ (uint8_t)(tmpaddr >> 24), (uint8_t)((tmpaddr >> 16) & 0xff),
+ (uint8_t)((tmpaddr >> 8) & 0xff), (uint8_t)(tmpaddr & 0xff),
175
ntohs(client.sin_port));
176
#endif
177
if (nbytes < 0)
0 commit comments