summaryrefslogtreecommitdiff
path: root/src/libstddjb/bitarray_not.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_not.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_not.c')
-rw-r--r--src/libstddjb/bitarray_not.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstddjb/bitarray_not.c b/src/libstddjb/bitarray_not.c
index 06da25a..b3f614d 100644
--- a/src/libstddjb/bitarray_not.c
+++ b/src/libstddjb/bitarray_not.c
@@ -3,7 +3,7 @@
#include <sys/types.h>
#include <skalibs/bitarray.h>
-void bitarray_not (register unsigned char *s, register size_t a, register size_t b)
+void bitarray_not (unsigned char *s, size_t a, size_t b)
{
if (!b) return ;
b += a ;
@@ -11,7 +11,7 @@ void bitarray_not (register unsigned char *s, register size_t a, register size_t
s[a>>3] ^= ((1 << (a & 7)) - 1) ^ ((a << (b & 7)) - 1) ;
else
{
- register size_t i = (a>>3) + 1 ;
+ size_t i = (a>>3) + 1 ;
s[a>>3] ^= ~((1 << (a & 7)) - 1) ;
for (; i < (b>>3) ; i++) s[i] = ~s[i] ;
s[b>>3] ^= (1 << (b & 7)) - 1 ;