From: Dan Williams Date: Tue, 22 Jul 2008 00:42:10 +0000 (-0700) Subject: imsm: remove some casts X-Git-Tag: mdadm-3.0-devel1~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ef649044b7e1cc1742ec9fc89a6f83061691a0ff;p=thirdparty%2Fmdadm.git imsm: remove some casts Signed-off-by: Dan Williams --- 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; }