From f6fe2dd0e6c9f50f4ee98025b1342e31be67dcdd Mon Sep 17 00:00:00 2001 From: gramanas Date: Mon, 29 Oct 2018 20:26:57 +0200 Subject: Make exit value -1 if error, 0 else. --- src/actionhelper.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) (limited to 'src/actionhelper.c') 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() { -- cgit v1.2.3