summaryrefslogtreecommitdiff
path: root/src/libstddjb/bitarray_clearsetn.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-07 18:28:04 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-07 18:28:04 +0000
commit86312d159d55e99db5a5c82d9c50f31a1fe28199 (patch)
tree0f9f94e6c6d223df2f4beb3247c96e510ff0804d /src/libstddjb/bitarray_clearsetn.c
parent2ddd93b4423b94578868e2701c265f8da4350965 (diff)
downloadskalibs-86312d159d55e99db5a5c82d9c50f31a1fe28199.tar.xz
Some trivial bugfixes and cleanups
Diffstat (limited to 'src/libstddjb/bitarray_clearsetn.c')
-rw-r--r--src/libstddjb/bitarray_clearsetn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstddjb/bitarray_clearsetn.c b/src/libstddjb/bitarray_clearsetn.c
index fe97045..613a8a8 100644
--- a/src/libstddjb/bitarray_clearsetn.c
+++ b/src/libstddjb/bitarray_clearsetn.c
@@ -8,7 +8,7 @@ void bitarray_clearsetn (unsigned char *s, size_t a, size_t b, int h)
b += a ;
if ((a >> 3) == ((b-1) >> 3))
{
- unsigned char mask = (1 << (a & 7)) - 1 ^ (1 << 1 + (b-1 & 7)) - 1 ;
+ unsigned char mask = (1 << (a & 7)) - 1 ^ (1 << (1 + (b-1 & 7))) - 1 ;
if (h) s[a>>3] |= mask ; else s[a>>3] &= ~mask ;
}
else