summaryrefslogtreecommitdiff
path: root/src/libstddjb/bitarray_clearsetn.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-02-22 10:03:15 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-02-22 10:03:15 +0000
commita5079576ae9007fb1ca7ebcc911b5fb035cd2d06 (patch)
tree70f4014dd37d780dfb45182d26092cb1998d4eec /src/libstddjb/bitarray_clearsetn.c
parent49d8fa1058aaf23c29e074b2314492ae40d2f557 (diff)
downloadskalibs-a5079576ae9007fb1ca7ebcc911b5fb035cd2d06.tar.xz
Types change: switch libdatastruct to uint32_t
Still needs to be reviewed.
Diffstat (limited to 'src/libstddjb/bitarray_clearsetn.c')
-rw-r--r--src/libstddjb/bitarray_clearsetn.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstddjb/bitarray_clearsetn.c b/src/libstddjb/bitarray_clearsetn.c
index 82bff7e..42900ad 100644
--- a/src/libstddjb/bitarray_clearsetn.c
+++ b/src/libstddjb/bitarray_clearsetn.c
@@ -3,19 +3,19 @@
#include <sys/types.h>
#include <skalibs/bitarray.h>
-void bitarray_clearsetn (register unsigned char *s, register size_t a, register size_t b, register int h)
+void bitarray_clearsetn (unsigned char *s, size_t a, size_t b, int h)
{
if (!b) return ;
b += a ;
if ((a >> 3) == ((b-1) >> 3))
{
- register 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
{
- register unsigned char mask = ~((1 << (a & 7)) - 1) ;
- register size_t i = (a>>3) + 1 ;
+ unsigned char mask = ~((1 << (a & 7)) - 1) ;
+ size_t i = (a>>3) + 1 ;
if (h) s[a>>3] |= mask ; else s[a>>3] &= ~mask ;
mask = h ? 0xff : 0x00 ;
for (; i < b>>3 ; i++) s[i] = mask ;