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_graph_closure.c | |
parent | 1e709ae40466a7742ba8cbdeff841c6edfaa5e5e (diff) | |
download | s6-rc-2270be82ade6f2e63d652602a3842aa1fca3cb7c.tar.xz |
Adapt to skalibs-2.5.0.0
Diffstat (limited to 'src/libs6rc/s6rc_graph_closure.c')
-rw-r--r-- | src/libs6rc/s6rc_graph_closure.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs6rc/s6rc_graph_closure.c b/src/libs6rc/s6rc_graph_closure.c index 0ec2def..7c3a8f9 100644 --- a/src/libs6rc/s6rc_graph_closure.c +++ b/src/libs6rc/s6rc_graph_closure.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <string.h> #include <skalibs/bitarray.h> #include <s6-rc/s6rc-db.h> #include <s6-rc/s6rc-utils.h> @@ -32,8 +33,8 @@ void s6rc_graph_closure (s6rc_db_t const *db, unsigned char *bits, unsigned int unsigned int m = bitarray_div8(n) ; unsigned char mark[m] ; recinfo_t info = { .db = db, .n = n, .bits = bits, .mark = mark, .mask = 1 << (bitno & 7), .h = !!h } ; - register unsigned int i = n ; - byte_zero(mark, m) ; + unsigned int i = n ; + memset(mark, 0, m) ; while (i--) if (bits[i] & info.mask) s6rc_graph_closure_rec(&info, i) ; } |