diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-13 13:08:49 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-13 13:08:49 +0000 |
| commit | 2270be82ade6f2e63d652602a3842aa1fca3cb7c (patch) | |
| tree | d159fd148ffec62a2e8c6d79beb3e50e0514571a /src/libs6rc/s6rc_db_check_depcycles.c | |
| parent | 1e709ae40466a7742ba8cbdeff841c6edfaa5e5e (diff) | |
| download | s6-rc-2270be82ade6f2e63d652602a3842aa1fca3cb7c.tar.gz | |
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/libs6rc/s6rc_db_check_depcycles.c')
| -rw-r--r-- | src/libs6rc/s6rc_db_check_depcycles.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libs6rc/s6rc_db_check_depcycles.c b/src/libs6rc/s6rc_db_check_depcycles.c index 5f7baa7..2bf96b4 100644 --- a/src/libs6rc/s6rc_db_check_depcycles.c +++ b/src/libs6rc/s6rc_db_check_depcycles.c @@ -1,9 +1,9 @@ /* ISC license. */ +#include <string.h> #include <stdint.h> #include <skalibs/diuint32.h> #include <skalibs/bitarray.h> -#include <skalibs/bytestr.h> #include <s6-rc/s6rc-db.h> typedef struct recinfo_s recinfo_t, *recinfo_t_ref ; @@ -25,7 +25,7 @@ static uint32_t s6rc_db_checknocycle_rec (recinfo_t *recinfo, uint32_t i) bitarray_set(recinfo->gray, i) ; while (j--) { - register uint32_t r = s6rc_db_checknocycle_rec(recinfo, recinfo->db->deps[recinfo->h * recinfo->db->ndeps + recinfo->db->services[i].deps[recinfo->h] + j]) ; + uint32_t r = s6rc_db_checknocycle_rec(recinfo, recinfo->db->deps[recinfo->h * recinfo->db->ndeps + recinfo->db->services[i].deps[recinfo->h] + j]) ; if (r < recinfo->n) return r ; } bitarray_set(recinfo->black, i) ; @@ -40,11 +40,11 @@ int s6rc_db_check_depcycles (s6rc_db_t const *db, int h, diuint32 *problem) unsigned char gray[bitarray_div8(n)] ; unsigned char black[bitarray_div8(n)] ; recinfo_t info = { .db = db, .n = n, .gray = gray, .black = black, .h = !!h } ; - byte_zero(gray, bitarray_div8(n)) ; - byte_zero(black, bitarray_div8(n)) ; + memset(gray, 0, bitarray_div8(n)) ; + memset(black, 0, bitarray_div8(n)) ; while (i--) { - register uint32_t r = s6rc_db_checknocycle_rec(&info, i) ; + uint32_t r = s6rc_db_checknocycle_rec(&info, i) ; if (r < n) { problem->left = i ; |
