From 722966c66dd2c95dbe7c194acb66e7c9baf255ec Mon Sep 17 00:00:00 2001 From: Paul Clements Date: Tue, 20 Jun 2006 10:01:23 +1000 Subject: [PATCH] Fix problem with post-increment usage in macro Bad/bad/bad, and cause compiler error on ppc (gcc 3.2.3). From: Paul Clements --- super1.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/super1.c b/super1.c index 9dc6644..467ff68 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);