Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5646
-gerrit
commit 747ba177f382f625f3d0834537ffd971bcbf7b29 Author: Paul Menzel paulepanter@users.sourceforge.net Date: Sat May 3 16:21:34 2014 +0200
lib/hexdump: Use `size_t` for length parameter of `hexdump32()`
In the signature of the function `hexdump32()` it does not make sense to represent a length, assumed to be positive, as a signed integer. With this change, it is no longer necessary to cast a pointer to unsigned long when passing it to `hexdump32()`.
The same change for the function `hexdump()` was done in commit 3dd0e72d [1].
lib/hexdump: Take const void * and size_t as arguments
[1] http://review.coreboot.org/4575
Change-Id: Id97f5daff95f94e862ee8b5be896a6629b125a13 Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- src/include/lib.h | 2 +- src/lib/hexdump.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/include/lib.h b/src/include/lib.h index c272eb5..8f02004 100644 --- a/src/include/lib.h +++ b/src/include/lib.h @@ -52,6 +52,6 @@ extern unsigned char _estack[];
/* Defined in src/lib/hexdump.c */ void hexdump(const void *memory, size_t length); -void hexdump32(char LEVEL, const void *d, int len); +void hexdump32(char LEVEL, const void *d, size_t len);
#endif /* __LIB_H__ */ diff --git a/src/lib/hexdump.c b/src/lib/hexdump.c index 44a5aa4..a15c5cd 100644 --- a/src/lib/hexdump.c +++ b/src/lib/hexdump.c @@ -62,7 +62,7 @@ void hexdump(const void *memory, size_t length) } }
-void hexdump32(char LEVEL, const void *d, int len) +void hexdump32(char LEVEL, const void *d, size_t len) { int count = 0;