diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-27 12:12:42 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-03-27 12:12:42 +0000 |
commit | 59027c94f50a0d983a2bf0ebb72ef406b4fef20d (patch) | |
tree | 18a2e2e1945ffd3d673c1bdc25b76d93dcf317d5 /src/minutils/s6ps_pwcache.c | |
parent | 54d4b6e74bf539930db2cafbe075416894900076 (diff) | |
download | s6-linux-utils-59027c94f50a0d983a2bf0ebb72ef406b4fef20d.tar.xz |
Make sure avltree indices (in s6-ps) are uint32_t
Diffstat (limited to 'src/minutils/s6ps_pwcache.c')
-rw-r--r-- | src/minutils/s6ps_pwcache.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/minutils/s6ps_pwcache.c b/src/minutils/s6ps_pwcache.c index 2f4c329..283a393 100644 --- a/src/minutils/s6ps_pwcache.c +++ b/src/minutils/s6ps_pwcache.c @@ -1,6 +1,7 @@ /* ISC license. */ #include <sys/types.h> +#include <stdint.h> #include <pwd.h> #include <errno.h> #include <skalibs/types.h> @@ -15,7 +16,7 @@ static genalloc pwcache_index = GENALLOC_ZERO ; int s6ps_pwcache_init (void) { - avltree_init(&pwcache_tree, 5, 3, 8, &left_dtok, &uint_cmp, &pwcache_index) ; + avltree_init(&pwcache_tree, 5, 3, 8, &left_dtok, &uint32_cmp, &pwcache_index) ; return 1 ; } @@ -28,8 +29,8 @@ void s6ps_pwcache_finish (void) int s6ps_pwcache_lookup (stralloc *sa, uid_t uid) { int wasnull = !satmp.s ; - dius_t d = { .left = (unsigned int)uid, .right = satmp.len } ; - unsigned int i ; + dius_t d = { .left = (uint32_t)uid, .right = satmp.len } ; + uint32_t i ; if (!avltree_search(&pwcache_tree, &d.left, &i)) { struct passwd *pw ; |