diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2019-06-26 09:52:17 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-07-23 09:09:22 +0000 |
commit | 65fe2948a91529c858fdae23a45408ca06953fcf (patch) | |
tree | 86d4dd1735f78b0ff89f78999c159f9cfb1421e8 /src/lib | |
parent | 34b0d4804fd7a05c6206f53bdc7aa72dcc73da13 (diff) | |
download | coreboot-65fe2948a91529c858fdae23a45408ca06953fcf.tar.xz |
src/lib/hexdump: Use size_t for indices
Spotted out using -Wconversion gcc warning option.
Change-Id: I29a7ae8c499bb1e8ab7c8741b2dfb7663d82a362
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/hexdump.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/hexdump.c b/src/lib/hexdump.c index 1e689e3e53..2c9e483d1d 100644 --- a/src/lib/hexdump.c +++ b/src/lib/hexdump.c @@ -19,14 +19,13 @@ void hexdump(const void *memory, size_t length) { - int i; + size_t i, j; uint8_t *line; int all_zero = 0; int all_one = 0; size_t num_bytes; for (i = 0; i < length; i += 16) { - int j; num_bytes = MIN(length - i, 16); line = ((uint8_t *)memory) + i; @@ -65,7 +64,7 @@ void hexdump(const void *memory, size_t length) void hexdump32(char LEVEL, const void *d, size_t len) { - int count = 0; + size_t count = 0; while (len > 0) { if (count % 8 == 0) { |