mirror of
https://github.com/eclipse/wakaama.git
synced 2025-05-08 23:31:37 +08:00
Fix format strings
No longer rely on unportable formatting strings.
This commit is contained in:
parent
7d468002e0
commit
182c5825ca
@ -267,7 +267,7 @@ void output_tlv(FILE * stream,
|
||||
uint8_t tmp;
|
||||
|
||||
print_indent(stream, indent+2);
|
||||
fprintf(stream, "data (%ld bytes):\r\n", dataLen);
|
||||
fprintf(stream, "data (%zu bytes):\r\n", dataLen);
|
||||
output_buffer(stream, (uint8_t*)buffer + length + dataIndex, dataLen, indent+2);
|
||||
|
||||
tmp = buffer[length + dataIndex + dataLen];
|
||||
|
@ -189,7 +189,7 @@ int connection_send(connection_t *connP,
|
||||
return -1;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Sending %lu bytes to [%s]:%hu\r\n", length, s, ntohs(port));
|
||||
fprintf(stderr, "Sending %zu bytes to [%s]:%hu\r\n", length, s, ntohs(port));
|
||||
|
||||
output_buffer(stderr, buffer, length, 0);
|
||||
#endif
|
||||
@ -215,13 +215,13 @@ uint8_t lwm2m_buffer_send(void * sessionH,
|
||||
|
||||
if (connP == NULL)
|
||||
{
|
||||
fprintf(stderr, "#> failed sending %lu bytes, missing connection\r\n", length);
|
||||
fprintf(stderr, "#> failed sending %zu bytes, missing connection\r\n", length);
|
||||
return COAP_500_INTERNAL_SERVER_ERROR ;
|
||||
}
|
||||
|
||||
if (-1 == connection_send(connP, buffer, length))
|
||||
{
|
||||
fprintf(stderr, "#> failed sending %lu bytes\r\n", length);
|
||||
fprintf(stderr, "#> failed sending %zu bytes\r\n", length);
|
||||
return COAP_500_INTERNAL_SERVER_ERROR ;
|
||||
}
|
||||
|
||||
|
@ -640,13 +640,13 @@ uint8_t lwm2m_buffer_send(void * sessionH,
|
||||
|
||||
if (connP == NULL)
|
||||
{
|
||||
fprintf(stderr, "#> failed sending %lu bytes, missing connection\r\n", length);
|
||||
fprintf(stderr, "#> failed sending %zu bytes, missing connection\r\n", length);
|
||||
return COAP_500_INTERNAL_SERVER_ERROR ;
|
||||
}
|
||||
|
||||
if (-1 == connection_send(connP, buffer, length))
|
||||
{
|
||||
fprintf(stderr, "#> failed sending %lu bytes\r\n", length);
|
||||
fprintf(stderr, "#> failed sending %zu bytes\r\n", length);
|
||||
return COAP_500_INTERNAL_SERVER_ERROR ;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user