aboutsummaryrefslogtreecommitdiffstats
path: root/src/actionhelper.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-10-29 20:26:57 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-10-29 20:26:57 +0200
commitf6fe2dd0e6c9f50f4ee98025b1342e31be67dcdd (patch)
treef28ff7595a7c363d398114dae4d717067c28b906 /src/actionhelper.c
parent5683c51d17b5eed7d2f070aa4e49cc21b65d82e5 (diff)
downloadck-f6fe2dd0e6c9f50f4ee98025b1342e31be67dcdd.tar.gz
ck-f6fe2dd0e6c9f50f4ee98025b1342e31be67dcdd.tar.bz2
ck-f6fe2dd0e6c9f50f4ee98025b1342e31be67dcdd.zip
Make exit value -1 if error, 0 else.
Diffstat (limited to 'src/actionhelper.c')
-rw-r--r--src/actionhelper.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/src/actionhelper.c b/src/actionhelper.c
index 5899024..d1891c9 100644
--- a/src/actionhelper.c
+++ b/src/actionhelper.c
@@ -307,13 +307,13 @@ int restore_make_links(cklist *from, cklist *to) {
void print_INIT_result(int err) {
if (!err) {
- HELP("Initialized empty ckdb.");
+ hLOG("Initialized empty ckdb.");
}
}
void print_ADD_result(int err) {
if (!err) {
- HELP("ckdb updated succesfully.");
+ hLOG("ckdb updated succesfully.");
return;
}
sERR("Could not complete add transaction.");
@@ -321,47 +321,30 @@ void print_ADD_result(int err) {
void print_DEL_result(int err) {
if (!err) {
- HELP("ckdb updated succesfully.");
- return;
- }
- if (err == -1) {
- sERR("Could not complete delete transaction.");
+ hLOG("ckdb updated succesfully.");
return;
}
+ sERR("Could not complete delete transaction.");
}
void print_EDIT_result(int err) {
- if (!err) {
- return;
- }
+ UNUSED(err);
}
void print_LIST_result(int err) {
- if (!err) {
- return;
- }
+ UNUSED(err);
}
void print_SEARCH_result(int err) {
- if (err == 2) {
- ERR("No grep avaliable. Please make sure you have grep installed.");
- return;
- }
- if (!err) {
- return;
- }
- ERR("Wrong search.");
+ UNUSED(err);
}
void print_HELP_result(int err) {
- if (!err) {
- }
+ UNUSED(err);
}
void print_RESTORE_result(int err) {
- if (err == -1) {
- sERR("Restore failed.")
- }
+ UNUSED(err);
}
void print_INIT_help() {