summary refs log tree commit diff
path: root/src/minutils/s6ps_otree.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-08 12:17:31 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-08 12:17:31 +0000
commit495d625add9e52b29a98c4fa2627a45d20d44849 (patch)
tree4927b430b4115c3217965fa08a9aba76fe809422 /src/minutils/s6ps_otree.c
parentfa3f206449c7c54afedbc2c7d4107a73e55c204a (diff)
downloads6-linux-utils-495d625add9e52b29a98c4fa2627a45d20d44849.tar.gz
s6-linux-utils-495d625add9e52b29a98c4fa2627a45d20d44849.tar.xz
s6-linux-utils-495d625add9e52b29a98c4fa2627a45d20d44849.zip
Make it build with skalibs-2.5.0.0
Diffstat (limited to 'src/minutils/s6ps_otree.c')
-rw-r--r--src/minutils/s6ps_otree.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/minutils/s6ps_otree.c b/src/minutils/s6ps_otree.c
index 447906e..0f7ccf1 100644
--- a/src/minutils/s6ps_otree.c
+++ b/src/minutils/s6ps_otree.c
@@ -4,8 +4,6 @@
 #include <skalibs/avltreen.h>
 #include "s6-ps.h"
 
-/* XXX: need to change all the types if the libdatastruct API changes */
-
 typedef struct ptreeiter_s ptreeiter_t, *ptreeiter_t_ref ;
 struct ptreeiter_s
 {
@@ -27,8 +25,8 @@ struct pstuff_s
 
 static int fillchildlist (unsigned int i, unsigned int h, void *x)
 {
-  register ptreeiter_t *pt = x ;
-  register unsigned int j = pt->ppindex[i] ;
+  ptreeiter_t *pt = x ;
+  unsigned int j = pt->ppindex[i] ;
   pt->childlist[pt->childindex[j] + pt->cpos[j]++] = i ;
   (void)h ;
   return 1 ;
@@ -37,7 +35,7 @@ static int fillchildlist (unsigned int i, unsigned int h, void *x)
 static void fillo_tree_rec (pstuff_t *blah, unsigned int root, signed int h)
 {
   static unsigned int j = 0 ;
-  register unsigned int i = !blah->p[root].pid ;
+  unsigned int i = !blah->p[root].pid ;
   if (blah->p[root].pid == 1) h = -1 ;
   blah->p[root].height = (h > 0) ? h : 0 ;
   blah->orderedlist[j++] = root ;
@@ -55,7 +53,7 @@ void s6ps_otree (pscan_t *p, unsigned int n, avltreen *pidtree, unsigned int *or
   unsigned int childlist[n] ;
   unsigned int childindex[n] ;
   unsigned int nchild[n] ;
-  register unsigned int i = 0 ;
+  unsigned int i = 0 ;
   for (; i < n ; i++) nchild[i] = 0 ;
 
  /* Compute the ppid tree */