From 59027c94f50a0d983a2bf0ebb72ef406b4fef20d Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 27 Mar 2017 12:12:42 +0000 Subject: Make sure avltree indices (in s6-ps) are uint32_t --- src/minutils/s6ps_ttycache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/minutils/s6ps_ttycache.c') diff --git a/src/minutils/s6ps_ttycache.c b/src/minutils/s6ps_ttycache.c index df59334..7fa4bc0 100644 --- a/src/minutils/s6ps_ttycache.c +++ b/src/minutils/s6ps_ttycache.c @@ -5,6 +5,7 @@ #endif #include +#include #include #include #include @@ -22,7 +23,7 @@ static genalloc ttycache_index = GENALLOC_ZERO ; int s6ps_ttycache_init (void) { - avltree_init(&ttycache_tree, 5, 3, 8, &left_dtok, &uint_cmp, &ttycache_index) ; + avltree_init(&ttycache_tree, 5, 3, 8, &left_dtok, &uint32_cmp, &ttycache_index) ; return 1 ; } @@ -112,8 +113,8 @@ static int ttyguess (stralloc *sa, dev_t ttynr) int s6ps_ttycache_lookup (stralloc *sa, dev_t ttynr) { int wasnull = !satmp.s ; - dius_t d = { .left = (unsigned int)ttynr, .right = satmp.len } ; - unsigned int i ; + dius_t d = { .left = (uint32_t)ttynr, .right = satmp.len } ; + uint32_t i ; if (!avltree_search(&ttycache_tree, &d.left, &i)) { unsigned int n = genalloc_len(dius_t, &ttycache_index) ; -- cgit v1.2.3