diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-03-01 11:57:50 +1030 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2018-03-19 10:56:03 +1030 |
commit | ee7af88352486863cbf046886c5e3493bd024766 (patch) | |
tree | c71ca4e1ff6116f864361431ce3e626d3392b060 /test/mbox.c | |
parent | c3144042b9f050c3d880f4ae5464a2a21617fe7d (diff) | |
download | phosphor-mboxd-ee7af88352486863cbf046886c5e3493bd024766.tar.gz phosphor-mboxd-ee7af88352486863cbf046886c5e3493bd024766.zip |
test: mbox: Type buf parameter to dump_buf() as `const void *`
This makes it a bit more ergonomic to use by not forcing the caller to
cast.
Change-Id: I5d40715f4de84f174157a39d459dc1b40a94a949
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'test/mbox.c')
-rw-r--r-- | test/mbox.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/mbox.c b/test/mbox.c index 6fe7277..c3b3574 100644 --- a/test/mbox.c +++ b/test/mbox.c @@ -39,8 +39,9 @@ #define STEP 16 -void dump_buf(const uint8_t *buf, size_t len) +void dump_buf(const void *buf, size_t len) { + const uint8_t *buf8 = buf; int i; for (i = 0; i < len; i += STEP) { @@ -53,7 +54,7 @@ void dump_buf(const uint8_t *buf, size_t len) printf("0x%08x:\t", i); for (j = 0; j < max; j++) - printf("0x%02x, ", buf[i + j]); + printf("0x%02x, ", buf8[i + j]); printf("\n"); } |