diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-10-26 13:52:32 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-10-26 13:52:32 +0300 |
commit | a6b2b4b2a4095d2f95419df986378e54432c2d71 (patch) | |
tree | ea94ac255bab5bf3665092c42207e8f3229411a2 /src/actionhelper.c | |
parent | c3267a360860de225fa0af666d99f60d03266249 (diff) | |
download | ck-a6b2b4b2a4095d2f95419df986378e54432c2d71.tar.gz ck-a6b2b4b2a4095d2f95419df986378e54432c2d71.tar.bz2 ck-a6b2b4b2a4095d2f95419df986378e54432c2d71.zip |
Small corrections
Diffstat (limited to 'src/actionhelper.c')
-rw-r--r-- | src/actionhelper.c | 11 |
1 files changed, 9 insertions, 2 deletions
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) { |