1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

proper line breaks in payload debug output

I guess the idea was to make a new line after every 16 elements, not every element except for every 16th
This commit is contained in:
benpicco 2014-02-07 09:05:28 +01:00
parent 52c92aa3b2
commit 86b2df0ca6

View File

@ -384,7 +384,7 @@ void recv_echo_req(void)
for (size_t i = 0; i < data_len; i++) {
printf("%02x ", echo_data_buf[i]);
if ((i + 1) % 16 || i == data_len - 1) {
if (!((i + 1) % 16) || i == data_len - 1) {
printf("\n");
}
}
@ -411,7 +411,7 @@ void recv_echo_repl(void)
for (size_t i = 0; i < data_len; i++) {
printf("%02x ", echo_data_buf[i]);
if ((i + 1) % 16 || i == data_len - 1) {
if (!((i + 1) % 16) || i == data_len - 1) {
printf("\n");
}
}