summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_register.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-04-17 02:03:44 +0200
committerDimitri Staessens <dimitri.staessens@ugent.be>2018-04-17 11:47:33 +0200
commit40e29aec791295652bb0cfc3dda0a47499b71384 (patch)
tree4d73d9768a56842804592393401cd3873ca49f68 /src/tools/irm/irm_register.c
parent85f51a1ae136f46cb2de5819415c2259d70d5994 (diff)
downloadouroboros-40e29aec791295652bb0cfc3dda0a47499b71384.tar.gz
ouroboros-40e29aec791295652bb0cfc3dda0a47499b71384.zip
tools: Fix help information for irm ipcp
The new command 'irm ipcp list' was not being printed upon printing the usage of 'irm ipcp'. It also fixes an unchecked return value. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'src/tools/irm/irm_register.c')
-rw-r--r--src/tools/irm/irm_register.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tools/irm/irm_register.c b/src/tools/irm/irm_register.c
index 59d65a69..23c65f7d 100644
--- a/src/tools/irm/irm_register.c
+++ b/src/tools/irm/irm_register.c
@@ -72,8 +72,9 @@ int do_register(int argc,
char * ipcp[MAX_IPCPS];
size_t ipcp_len = 0;
struct ipcp_info * ipcps;
- size_t len;
- size_t i;
+ ssize_t len;
+ ssize_t i;
+
while (argc > 0) {
if (matches(*argv, "name") == 0) {
@@ -106,6 +107,9 @@ int do_register(int argc,
}
len = irm_list_ipcps(&ipcps);
+ if (len < 0)
+ return len;
+
for (i = 0; i < len; ++i) {
size_t j;
for (j = 0; j < layers_len; j++) {