From: SimonQian Date: Fri, 18 Feb 2011 12:39:55 +0000 (+0800) Subject: fix compile error under MinGW X-Git-Tag: v0.5.0-rc1~169 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2bd6a4795a2c4096aab614d729fe189b67b78d44;p=openocd fix compile error under MinGW --- diff --git a/src/flash/nand/ecc.c b/src/flash/nand/ecc.c index b4039976..b3623d4c 100644 --- a/src/flash/nand/ecc.c +++ b/src/flash/nand/ecc.c @@ -121,12 +121,12 @@ int nand_calculate_ecc(struct nand_device *nand, const uint8_t *dat, uint8_t *ec return 0; } -static inline int countbits(uint32_t byte) +static inline int countbits(uint32_t b) { int res = 0; - for (;byte; byte >>= 1) - res += byte & 0x01; + for (;b; b >>= 1) + res += b & 0x01; return res; }