summaryrefslogtreecommitdiff
path: root/src/evanix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evanix.c')
-rw-r--r--src/evanix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evanix.c b/src/evanix.c
index b4852bb..da517b0 100644
--- a/src/evanix.c
+++ b/src/evanix.c
@@ -337,12 +337,12 @@ static int opts_read(struct evanix_opts_t *opts, char **expr, int argc,
}
out_free_evanix:
- if (ret != 0)
+ if (ret < 0)
evanix_free(opts);
else
*expr = argv[optind];
- return ret;
+ return ret < 0 ? ret : 0;
}
static int evanix_free(struct evanix_opts_t *opts)