]> sourceware.org Git - lvm2.git/commitdiff
Fix 'void*' arithmetic warnings in dbg_malloc.c.
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 3 Aug 2010 13:24:07 +0000 (13:24 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Tue, 3 Aug 2010 13:24:07 +0000 (13:24 +0000)
Use more readable char[idx] access instead of *char+idx access.

WHATS_NEW
libdm/mm/dbg_malloc.c

index a36bd1992104a4b19b1bc3b4e64267e22fb81a16..72630ed17d8e96fbc3827f944cb729666a2d1dfb 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.73 - 
 ================================
+  Fix 'void*' arithmetic warnings in dbg_malloc.c.
   Fix 'void*' arithmetic warning in some functions from libdm-iface.c.
   Fix const warning in dev_manager_info() and _dev_manager_lv_rmnodes().
   Fix const warning in archive_file structure from archive.c.
index 0add7b62159a6befa8a739bfd5cc2f3d56b7e905..d86326db13eca7924c086035930e993afb855d62 100644 (file)
@@ -196,12 +196,12 @@ int dm_dump_memory_debug(void)
                for (c = 0; c < sizeof(str) - 1; c++) {
                        if (c >= mb->length)
                                str[c] = ' ';
-                       else if (*(char *)(mb->magic + c) == '\0')
+                       else if (((char *)mb->magic)[c] == '\0')
                                str[c] = '\0';
-                       else if (*(char *)(mb->magic + c) < ' ')
+                       else if (((char *)mb->magic)[c] < ' ')
                                str[c] = '?';
                        else
-                               str[c] = *(char *)(mb->magic + c);
+                               str[c] = ((char *)mb->magic)[c];
                }
                str[sizeof(str) - 1] = '\0';
 
This page took 0.042912 seconds and 5 git commands to generate.