summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-07-21 17:42:10 -0700
committerDan Williams <dan.j.williams@intel.com>2008-07-21 17:42:10 -0700
commitef649044b7e1cc1742ec9fc89a6f83061691a0ff (patch)
tree32c24c431268cceb770c8e65055871062655486a
parent5257ce365b9fe36e0a5f4399ecbe98aad770fb44 (diff)
imsm: remove some casts
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--super-intel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/super-intel.c b/super-intel.c
index 0ac86439..d96e2b5b 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -797,7 +797,7 @@ static int load_imsm_mpb(int fd, struct intel_super *super, char *devname)
mpb_size = __le32_to_cpu(anchor->mpb_size);
mpb_size = ROUND_UP(mpb_size, 512);
- if (posix_memalign((void**)&super->mpb, 512, mpb_size) != 0) {
+ if (posix_memalign(&super->buf, 512, mpb_size) != 0) {
if (devname)
fprintf(stderr,
Name ": unable to allocate %zu byte mpb buffer\n",
@@ -1173,10 +1173,11 @@ static int init_super_imsm(struct supertype *st, mdu_array_info_t *info,
if (!super)
return 0;
mpb_size = disks_to_mpb_size(info->nr_disks);
- if (posix_memalign((void**)&mpb, 512, mpb_size) != 0) {
+ if (posix_memalign(&super->buf, 512, mpb_size) != 0) {
free(super);
return 0;
}
+ mpb = super->buf;
memset(mpb, 0, mpb_size);
memcpy(mpb->sig, MPB_SIGNATURE, strlen(MPB_SIGNATURE));
@@ -1184,7 +1185,6 @@ static int init_super_imsm(struct supertype *st, mdu_array_info_t *info,
strlen(MPB_VERSION_RAID5));
mpb->mpb_size = mpb_size;
- super->mpb = mpb;
st->sb = super;
return 1;
}