Merge pull request #647 from benpicco/patch-1

proper line breaks in payload debug output
This commit is contained in:
Christian Mehlis 2014-02-08 12:23:28 +01:00
commit 8076d1c3a6

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");
}
}