]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Update print_buffer() to use const
authorSimon Glass <sjg@chromium.org>
Sun, 24 Feb 2013 17:33:12 +0000 (17:33 +0000)
committerSimon Glass <sjg@chromium.org>
Fri, 1 Mar 2013 03:09:21 +0000 (19:09 -0800)
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 <sjg@chromium.org>
include/common.h
lib/display_options.c

index 4ad17eafb9b89a15975b0b8945a1b70c198d8d88..170f4391a67ef84cecd3871b75d3bdd7fffc5a07 100644 (file)
@@ -270,7 +270,8 @@ int cpu_init(void);
 phys_size_t initdram (int);
 int    display_options (void);
 void   print_size(unsigned long long, const char *);
-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);
 
 /* common/main.c */
 void   main_loop       (void);
index 694d2f22e89ec574f9db84d75de143c52fbf9507..0339970e7d6963cac8f7f1ad2d322c012c7ae966 100644 (file)
@@ -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 {