X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lib%2Fext2fs%2Fbitops.c;h=c4a1d4e095d1face8ccf600555032e83d158eab2;hb=b9cbd54b4a9c1bef0362b9b84b3ab61da0025998;hp=7c3f215f515dd0b9db5a651b71f1cd66d80c2aaf;hpb=c6b006ea6c9fec7f3f33347a52efc396063bcd26;p=tools%2Fe2fsprogs.git diff --git a/lib/ext2fs/bitops.c b/lib/ext2fs/bitops.c index 7c3f215..c4a1d4e 100644 --- a/lib/ext2fs/bitops.c +++ b/lib/ext2fs/bitops.c @@ -24,7 +24,7 @@ /* * For the benefit of those who are trying to port Linux to another * architecture, here are some C-language equivalents. You should - * recode these in the native assmebly language, if at all possible. + * recode these in the native assembly language, if at all possible. * * C language equivalents written by Theodore Ts'o, 9/26/92. * Modified by Pete A. Zaitcev 7/14/95 to be portable to big endian @@ -138,11 +138,11 @@ unsigned int ext2fs_bitcount(const void *addr, unsigned int nbytes) const __u32 *p; unsigned int res = 0; - while (((((unsigned long) cp) & 3) != 0) && (nbytes > 0)) { + while (((((uintptr_t) cp) & 3) != 0) && (nbytes > 0)) { res += popcount8(*cp++); nbytes--; } - p = (__u32 *) cp; + p = (const __u32 *) cp; while (nbytes > 4) { res += popcount32(*p++);