From: Dan Williams Date: Fri, 25 Jul 2008 00:26:23 +0000 (-0700) Subject: imsm: fix store_zero_imsm breakage from posix_memalign conversion X-Git-Tag: mdadm-3.0-devel1~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb7ea4630f2df057f4df36eed7a1ec03150f0e76;p=thirdparty%2Fmdadm.git imsm: fix store_zero_imsm breakage from posix_memalign conversion Signed-off-by: Dan Williams --- diff --git a/super-intel.c b/super-intel.c index d133dc5b..8640cea1 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1434,8 +1434,8 @@ static int store_zero_imsm(struct supertype *st, int fd) if (posix_memalign(&buf, 512, 512) != 0) return 1; - memset(buf, 0, sizeof(buf)); - if (write(fd, buf, sizeof(buf)) != sizeof(buf)) + memset(buf, 0, 512); + if (write(fd, buf, 512) != 512) return 1; return 0; }