summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_db_check_depcycles.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6rc/s6rc_db_check_depcycles.c')
-rw-r--r--src/libs6rc/s6rc_db_check_depcycles.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs6rc/s6rc_db_check_depcycles.c b/src/libs6rc/s6rc_db_check_depcycles.c
index db6ed6e..5f7baa7 100644
--- a/src/libs6rc/s6rc_db_check_depcycles.c
+++ b/src/libs6rc/s6rc_db_check_depcycles.c
@@ -1,6 +1,6 @@
/* ISC license. */
-#include <skalibs/uint32.h>
+#include <stdint.h>
#include <skalibs/diuint32.h>
#include <skalibs/bitarray.h>
#include <skalibs/bytestr.h>
@@ -10,22 +10,22 @@ typedef struct recinfo_s recinfo_t, *recinfo_t_ref ;
struct recinfo_s
{
s6rc_db_t const *db ;
- uint32 n ;
+ uint32_t n ;
unsigned char *gray ;
unsigned char *black ;
unsigned char h : 1 ;
} ;
-static uint32 s6rc_db_checknocycle_rec (recinfo_t *recinfo, uint32 i)
+static uint32_t s6rc_db_checknocycle_rec (recinfo_t *recinfo, uint32_t i)
{
if (!bitarray_peek(recinfo->black, i))
{
- uint32 j = recinfo->db->services[i].ndeps[recinfo->h] ;
+ uint32_t j = recinfo->db->services[i].ndeps[recinfo->h] ;
if (bitarray_peek(recinfo->gray, i)) return i ;
bitarray_set(recinfo->gray, i) ;
while (j--)
{
- register uint32 r = s6rc_db_checknocycle_rec(recinfo, recinfo->db->deps[recinfo->h * recinfo->db->ndeps + recinfo->db->services[i].deps[recinfo->h] + 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]) ;
if (r < recinfo->n) return r ;
}
bitarray_set(recinfo->black, i) ;
@@ -35,8 +35,8 @@ static uint32 s6rc_db_checknocycle_rec (recinfo_t *recinfo, uint32 i)
int s6rc_db_check_depcycles (s6rc_db_t const *db, int h, diuint32 *problem)
{
- uint32 n = db->nshort + db->nlong ;
- uint32 i = n ;
+ uint32_t n = db->nshort + db->nlong ;
+ uint32_t i = n ;
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 } ;
@@ -44,7 +44,7 @@ int s6rc_db_check_depcycles (s6rc_db_t const *db, int h, diuint32 *problem)
byte_zero(black, bitarray_div8(n)) ;
while (i--)
{
- register uint32 r = s6rc_db_checknocycle_rec(&info, i) ;
+ register uint32_t r = s6rc_db_checknocycle_rec(&info, i) ;
if (r < n)
{
problem->left = i ;