Skip to content
Snippets Groups Projects
Commit 8ad154c0 authored by Niels Möller's avatar Niels Möller
Browse files

(print_hex): Add line breaks.

Rev: src/nettle/testsuite/testutils.c:1.20
parent 6003487b
Branches
Tags
No related merge requests found
...@@ -115,10 +115,20 @@ print_hex(unsigned length, uint8_t *data) ...@@ -115,10 +115,20 @@ print_hex(unsigned length, uint8_t *data)
for (i = 0; i < length; i++) for (i = 0; i < length; i++)
{ {
if (! (i % 8)) switch (i % 16)
{
default:
break;
case 0:
printf("\n");
break;
case 8:
printf(" "); printf(" ");
break;
}
printf("%02x", data[i]); printf("%02x", data[i]);
} }
printf("\n");
} }
int verbose = 0; int verbose = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment