]> sourceware.org Git - lvm2.git/commitdiff
Switch void* to char* arithmetic
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 20 Dec 2010 13:37:26 +0000 (13:37 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 20 Dec 2010 13:37:26 +0000 (13:37 +0000)
WHATS_NEW
lib/activate/activate.c
tools/dmsetup.c

index f107e41f3a6ce252b2ff4d8a2c3e228bda068539..41ddca9eef4d9dc216032258c25abc825d8cfd98 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.79 -  
 ===================================
+  Use char* arithmetic in target_version(), _process_all(), _targets().
   Fixing const cast gcc warnings in the code.
   Check read() and close() results in _get_cmdline().
   Add const for struct config_node usage.
index 64c296bd9b91db3e9de04913984b4c220e9454b1..174f09e731efe472a887fe52b98306eeab6b6f81 100644 (file)
@@ -398,7 +398,7 @@ int target_version(const char *target_name, uint32_t *maj,
                        goto out;
                }
 
-               target = (void *) target + target->next;
+               target = (struct dm_versions *)((char *) target + target->next);
        } while (last_target != target);
 
       out:
index 1a56d2418aff71564451c87269a1f39704af7c4e..56f157904f3255d644e0f2e9e35800f0b0730b91 100644 (file)
@@ -1288,8 +1288,8 @@ static int _process_all(int argc, char **argv, int silent,
        }
 
        do {
-               names = (void *) names + next;
-               if (!fn(argc, argv, (void *) names))
+               names = (struct dm_names *)((char *) names + next);
+               if (!fn(argc, argv, names))
                        r = 0;
                next = names->next;
        } while (next);
@@ -1632,7 +1632,7 @@ static int _targets(int argc __attribute__((unused)), char **argv __attribute__(
                printf("%-16s v%d.%d.%d\n", target->name, target->version[0],
                       target->version[1], target->version[2]);
 
-               target = (void *) target + target->next;
+               target = (struct dm_versions *)((char *) target + target->next);
        } while (last_target != target);
 
        r = 1;
This page took 0.042786 seconds and 5 git commands to generate.