From a6b2b4b2a4095d2f95419df986378e54432c2d71 Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 26 Oct 2018 13:52:32 +0300 Subject: Small corrections --- src/actionhelper.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/actionhelper.c') diff --git a/src/actionhelper.c b/src/actionhelper.c index 6e76b2b..ad259a2 100644 --- a/src/actionhelper.c +++ b/src/actionhelper.c @@ -102,6 +102,10 @@ DelOpt del_make_options(cklist *args) { delOpt.arg = list_get(args); } else { delOpt.arg = list_get(args); + if (list_next(args)) { + delOpt.err = DEL_ERR_WRONG_ARGS; + return delOpt; + } } list_rewind(args); @@ -271,7 +275,7 @@ void print_ADD_result(int err) { HELP("ckdb updated succesfully."); return; } - ERR("Could not complete add transaction."); + sERR("Could not complete add transaction."); } void print_DEL_result(int err) { @@ -279,7 +283,10 @@ void print_DEL_result(int err) { HELP("ckdb updated succesfully."); return; } - ERR("Could not complete delete transaction."); + if (err == -1) { + sERR("Could not complete delete transaction."); + return; + } } void print_EDIT_result(int err) { -- cgit v1.2.3