diff options
Diffstat (limited to 'src/progman.c')
-rw-r--r-- | src/progman.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/progman.c b/src/progman.c index 456b5ff..f241915 100644 --- a/src/progman.c +++ b/src/progman.c @@ -47,7 +47,7 @@ struct prog struct { struct component *comp; - unsigned idx; /* Numeric identifier */ + size_t idx; /* Numeric identifier */ int socket; struct prog *redir[2]; /* Pointers to redirectors */ time_t timestamp; /* Time of last startup */ @@ -69,7 +69,7 @@ struct prog #define IS_COMPONENT(p) ((p)->type == TYPE_COMPONENT) -static unsigned numcomp; +static size_t numcomp; static struct prog *proghead, *progtail; static pies_depmap_t depmap; static int recompute_alarm; @@ -944,11 +944,11 @@ void print_dep (struct prog *prog) { pies_depmap_pos_t pos; - unsigned n; + size_t n; logmsg_printf (LOG_NOTICE, "%s -> ", prog->tag); for (n = depmap_first (depmap, depmap_col, prog->v.p.idx, &pos); - n != (unsigned)-1; + n != (size_t)-1; n = depmap_next (depmap, pos)) { struct prog *dp = prog_lookup_by_idx (n); @@ -976,16 +976,16 @@ void progman_dump_depmap () { struct prog *prog; - unsigned i, j; + size_t i, j; printf ("%s:\n", _("Dependency map")); printf (" "); for (i = 0; i < numcomp; i++) - printf (" %2d", i); + printf (" %2lu", (unsigned long)i); printf ("\n"); for (i = 0; i < numcomp; i++) { - printf ("%2d ", i); + printf ("%2lu ", (unsigned long)i); for (j = 0; j < numcomp; j++) printf (" %c ", depmap_isset (depmap, i, j) ? 'X' : ' '); printf ("\n"); @@ -995,7 +995,7 @@ progman_dump_depmap () { prog = prog_lookup_by_idx (i); if (prog) - printf ("%2d: %s\n", i, prog->tag); + printf ("%2d: %s\n", (unsigned long)i, prog->tag); } } @@ -1003,7 +1003,7 @@ int progman_build_depmap () { int rc = 0; - unsigned i; + size_t i; struct prog *prog; pies_depmap_t dp; @@ -1244,12 +1244,12 @@ void prog_stop_dependents (struct prog *prog) { pies_depmap_pos_t pos; - unsigned n; + size_t n; int warned = 0; prog_stop_redirectors (prog); for (n = depmap_first (depmap, depmap_row, prog->v.p.idx, &pos); - n != (unsigned)-1; + n != (size_t)-1; n = depmap_next (depmap, pos)) { struct prog *dp = prog_lookup_by_idx (n); |