From bda32ffcf712806c7880ded25a012fbeede35e80 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 24 Feb 2013 17:33:12 +0000 Subject: Update print_buffer() to use const The buffer cannot be changed by this function, so change the buffer pointer to a const. This allows callers with const pointer to use the function without a cast. Signed-off-by: Simon Glass --- lib/display_options.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/display_options.c') diff --git a/lib/display_options.c b/lib/display_options.c index 694d2f22e8..0339970e7d 100644 --- a/lib/display_options.c +++ b/lib/display_options.c @@ -98,7 +98,8 @@ void print_size(unsigned long long size, const char *s) */ #define MAX_LINE_LENGTH_BYTES (64) #define DEFAULT_LINE_LENGTH_BYTES (16) -int print_buffer (ulong addr, void* data, uint width, uint count, uint linelen) +int print_buffer(ulong addr, const void *data, uint width, uint count, + uint linelen) { /* linebuf as a union causes proper alignment */ union linebuf { -- cgit