summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_db_check_revdeps.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-13 13:08:49 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-13 13:08:49 +0000
commit2270be82ade6f2e63d652602a3842aa1fca3cb7c (patch)
treed159fd148ffec62a2e8c6d79beb3e50e0514571a /src/libs6rc/s6rc_db_check_revdeps.c
parent1e709ae40466a7742ba8cbdeff841c6edfaa5e5e (diff)
downloads6-rc-2270be82ade6f2e63d652602a3842aa1fca3cb7c.tar.xz
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/libs6rc/s6rc_db_check_revdeps.c')
-rw-r--r--src/libs6rc/s6rc_db_check_revdeps.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libs6rc/s6rc_db_check_revdeps.c b/src/libs6rc/s6rc_db_check_revdeps.c
index 3b64c36..0097d06 100644
--- a/src/libs6rc/s6rc_db_check_revdeps.c
+++ b/src/libs6rc/s6rc_db_check_revdeps.c
@@ -1,7 +1,6 @@
/* ISC license. */
-#include <sys/types.h>
-#include <skalibs/bytestr.h>
+#include <string.h>
#include <skalibs/bitarray.h>
#include <s6-rc/s6rc-db.h>
@@ -10,18 +9,18 @@ int s6rc_db_check_revdeps (s6rc_db_t const *db)
size_t n = db->nshort + db->nlong ;
size_t m = bitarray_div8(n) ;
unsigned char matrix[n * m] ;
- register unsigned int i = n ;
- register unsigned char const *p = matrix ;
- byte_zero(matrix, n * m) ;
+ unsigned int i = n ;
+ unsigned char const *p = matrix ;
+ memset(matrix, 0, n * m) ;
while (i--)
{
- register unsigned int j = db->services[i].ndeps[1] ;
+ unsigned int j = db->services[i].ndeps[1] ;
while (j--) bitarray_not(matrix + m * i, db->deps[db->ndeps + db->services[i].deps[1] + j], 1) ;
}
i = n ;
while (i--)
{
- register unsigned int j = db->services[i].ndeps[0] ;
+ unsigned int j = db->services[i].ndeps[0] ;
while (j--) bitarray_not(matrix + m * db->deps[db->services[i].deps[0] + j], i, 1) ;
}
n *= m ;