mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 19:23:24 +02:00
lbutils hexdump: reduce width on smaller integers
showing the size for 64-bit high integers seems silly Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -80,7 +80,10 @@ spew_hex(const void *data, size_t len)
|
|||||||
|
|
||||||
for (i = 0; i < len; i += 16) {
|
for (i = 0; i < len; i += 16) {
|
||||||
|
|
||||||
printf("%0*zx ", sizeof(size_t) * 2, i);
|
if (len <= 4294967296) /* below 4GB */
|
||||||
|
printf("%08zx ", i);
|
||||||
|
else
|
||||||
|
printf("%0*zx ", sizeof(size_t) * 2, i);
|
||||||
|
|
||||||
for (j = 0; j < 16; j++) {
|
for (j = 0; j < 16; j++) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user