aboutsummaryrefslogtreecommitdiffstats
path: root/src/actionhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/actionhelper.c')
-rw-r--r--src/actionhelper.c11
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) {