diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-09-30 17:45:39 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-09-30 17:45:39 +0000 |
commit | 3e1f1edde90c4d8286837ac5864111df30bf1275 (patch) | |
tree | 7fa8fa4bb36a5388061a382958ceac649c9a1dd7 /src/minutils/s6-ps.c | |
parent | c9620313f89e438ed1b765a8ea64756fb61c16e7 (diff) | |
download | s6-linux-utils-3e1f1edde90c4d8286837ac5864111df30bf1275.tar.xz |
Fix clang build: rewrite avltreeb into avltreen, requires new skalibs
Thanks John Regan for the report. His fix idea duplicated the
pointers to storage and freelist; there's no way to support a
C99 avltreeb without duplicating the avltreen functionality,
so I ended up scrapping avltreeb in skalibs.
Diffstat (limited to 'src/minutils/s6-ps.c')
-rw-r--r-- | src/minutils/s6-ps.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/minutils/s6-ps.c b/src/minutils/s6-ps.c index bba973b..d6a69a4 100644 --- a/src/minutils/s6-ps.c +++ b/src/minutils/s6-ps.c @@ -286,20 +286,19 @@ int main (int argc, char const *const *argv) /* Order the processes for display */ { - AVLTREEB_TYPE(n+1) pidtree ; - avltreeb_init(&pidtree, n+1, &pid_dtok, &uint32_cmp, p) ; + AVLTREEN_DECLARE_AND_INIT(pidtree, n+1, &pid_dtok, &uint32_cmp, p) ; for (i = 0 ; i < n ; i++) { if (needstat && !s6ps_statparse(p+i)) strerr_diefu1sys(111, "parse process stats") ; - if (!avltreeb_insert(&pidtree, i)) - strerr_diefu1sys(111, "avltreeb_insert") ; + if (!avltreen_insert(&pidtree, i)) + strerr_diefu1sys(111, "avltreen_insert") ; } - if (!avltreeb_insert(&pidtree, n)) - strerr_diefu1sys(111, "avltreeb_insert") ; + if (!avltreen_insert(&pidtree, n)) + strerr_diefu1sys(111, "avltreen_insert") ; - if (flagtree) s6ps_otree(p, n+1, &pidtree.info, orderedlist) ; - else avltreeb_iter_nocancel(&pidtree, avltreeb_totalsize(&pidtree), &fillo_notree, orderedlist) ; + if (flagtree) s6ps_otree(p, n+1, &pidtree, orderedlist) ; + else avltreen_iter_nocancel(&pidtree, avltreen_totalsize(&pidtree), &fillo_notree, orderedlist) ; } |