summaryrefslogtreecommitdiffstats
path: root/cli/src/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/input.c')
-rw-r--r--cli/src/input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/src/input.c b/cli/src/input.c
index a88d358745a..004c9e300e5 100644
--- a/cli/src/input.c
+++ b/cli/src/input.c
@@ -71,11 +71,11 @@ cli_input (void *d)
if (len > 0 && cmd[len - 1] == '\n') //strip trailing \n
cmd[len - 1] = '\0';
ret = cli_cmd_process_line (state, cmd);
- if (ret == -1 && state->mode & GLUSTER_MODE_ERR_FATAL)
+ if (ret != 0 && state->mode & GLUSTER_MODE_ERR_FATAL)
break;
}
- exit (ret);
+ exit (-ret);
return NULL;
}