diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-06 18:06:47 +0200 |
---|---|---|
committer | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-06 18:06:47 +0200 |
commit | 0b2e5c5410580c755cef02114e51f15b19cfaffa (patch) | |
tree | 63d684e6057c9caa43739b599d54a72f9959d4f8 /src/tools/irm/irm_unregister.c | |
parent | bfc29ca20406ccd69363b0f9796987534318e7ae (diff) | |
parent | d9ad3852613cda026d4520b5c608ada7433dd7d9 (diff) | |
download | ouroboros-0b2e5c5410580c755cef02114e51f15b19cfaffa.tar.gz ouroboros-0b2e5c5410580c755cef02114e51f15b19cfaffa.zip |
Merge branch 'testing' into be
Diffstat (limited to 'src/tools/irm/irm_unregister.c')
-rw-r--r-- | src/tools/irm/irm_unregister.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/irm/irm_unregister.c b/src/tools/irm/irm_unregister.c index 52491b42..137bc7e9 100644 --- a/src/tools/irm/irm_unregister.c +++ b/src/tools/irm/irm_unregister.c @@ -69,7 +69,7 @@ int do_unregister(int argc, char ** argv) char * ipcp[MAX_IPCPS]; size_t ipcp_len = 0; struct ipcp_info * ipcps; - size_t len; + ssize_t len; size_t i; while (argc > 0) { @@ -103,7 +103,10 @@ int do_unregister(int argc, char ** argv) } len = irm_list_ipcps(&ipcps); - for (i = 0; i < len; ++i) { + if (len < 0) + return -1; + + for (i = 0; i < (size_t) len; ++i) { size_t j; for (j = 0; j < layers_len; j++) { if (wildcard_match(ipcps[i].layer, layers[j]) == 0) { |