diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2010-08-03 13:24:07 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2010-08-03 13:24:07 +0000 |
commit | 59f8043d7ceb51b905ef9c1ff4138716e4d31d40 (patch) | |
tree | f4b654299964f5ea94a64bd0c20bc9fc87faf7f9 /libdm/mm | |
parent | 30168792f4763e6befdc9ae5d0f556a57657f96b (diff) | |
download | lvm2-59f8043d7ceb51b905ef9c1ff4138716e4d31d40.tar.gz lvm2-59f8043d7ceb51b905ef9c1ff4138716e4d31d40.tar.xz lvm2-59f8043d7ceb51b905ef9c1ff4138716e4d31d40.zip |
Fix 'void*' arithmetic warnings in dbg_malloc.c.
Use more readable char[idx] access instead of *char+idx access.
Diffstat (limited to 'libdm/mm')
-rw-r--r-- | libdm/mm/dbg_malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdm/mm/dbg_malloc.c b/libdm/mm/dbg_malloc.c index 0add7b62..d86326db 100644 --- a/libdm/mm/dbg_malloc.c +++ b/libdm/mm/dbg_malloc.c @@ -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'; |