1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-30 01:47:56 +03:00

Switch void* to char* arithmetic

This commit is contained in:
Zdenek Kabelac 2010-12-20 13:37:26 +00:00
parent 9d9de35dca
commit d40d166f91
3 changed files with 5 additions and 4 deletions

View File

@ -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.

View 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:

View 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;