diff options
author | Theodore Ts'o <tytso@mit.edu> | 2005-06-30 19:40:18 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2005-06-30 19:40:18 -0400 |
commit | 80af12e180bdea9ed391a0aee58e31cee7641709 (patch) | |
tree | 022a9ccb6c6a0f2a69d82ab78929e2e149aa071f /lib/ext2fs/bitops.c | |
parent | 55080a7637172402c51eb4f2fb2b81870c04de3d (diff) | |
download | e2fsprogs-80af12e180bdea9ed391a0aee58e31cee7641709.tar.gz |
Change the function prototypes of ext2fs_set_bit, ext2fs_clear_bit, and
ext2fs_test_bit to take an unsigned int for the bit number. Negative
bit numbers were never allowed (and didn't make any sense), so this should
be a safe change. This is needed to allow safe use of block numbers
greater than or equal to 2**31.
Diffstat (limited to 'lib/ext2fs/bitops.c')
-rw-r--r-- | lib/ext2fs/bitops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ext2fs/bitops.c b/lib/ext2fs/bitops.c index 207c44d9..78632c62 100644 --- a/lib/ext2fs/bitops.c +++ b/lib/ext2fs/bitops.c @@ -30,7 +30,7 @@ * systems, as well as non-32 bit systems. */ -int ext2fs_set_bit(int nr,void * addr) +int ext2fs_set_bit(unsigned int nr,void * addr) { int mask, retval; unsigned char *ADDR = (unsigned char *) addr; @@ -42,7 +42,7 @@ int ext2fs_set_bit(int nr,void * addr) return retval; } -int ext2fs_clear_bit(int nr, void * addr) +int ext2fs_clear_bit(unsigned int nr, void * addr) { int mask, retval; unsigned char *ADDR = (unsigned char *) addr; @@ -54,7 +54,7 @@ int ext2fs_clear_bit(int nr, void * addr) return retval; } -int ext2fs_test_bit(int nr, const void * addr) +int ext2fs_test_bit(unsigned int nr, const void * addr) { int mask; const unsigned char *ADDR = (const unsigned char *) addr; |