From: Paul Clements Date: Tue, 20 Jun 2006 00:01:23 +0000 (+1000) Subject: Fix problem with post-increment usage in macro X-Git-Tag: mdadm-2.5.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=722966c66dd2c95dbe7c194acb66e7c9baf255ec;p=thirdparty%2Fmdadm.git Fix problem with post-increment usage in macro Bad/bad/bad, and cause compiler error on ppc (gcc 3.2.3). From: Paul Clements --- diff --git a/super1.c b/super1.c index 9dc66448..467ff68b 100644 --- a/super1.c +++ b/super1.c @@ -124,8 +124,10 @@ static unsigned int calc_sb_1_csum(struct mdp_superblock_1 * sb) disk_csum = sb->sb_csum; sb->sb_csum = 0; newcsum = 0; - for (i=0; size>=4; size -= 4 ) - newcsum += __le32_to_cpu(*isuper++); + for (i=0; size>=4; size -= 4 ) { + newcsum += __le32_to_cpu(*isuper); + isuper++; + } if (size == 2) newcsum += __le16_to_cpu(*(unsigned short*) isuper);