diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-09-22 12:58:22 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-09-22 12:58:22 +0300 |
commit | 405afc36e0929d887188be09a5886f79ff0ea1c4 (patch) | |
tree | f31d36ad4229f207e7e7bfbfe679516295e82952 /src/actionhelper.c | |
parent | fe7c216a75ad1a5890c329df73f1d5ab461a1257 (diff) | |
download | ck-405afc36e0929d887188be09a5886f79ff0ea1c4.tar.gz ck-405afc36e0929d887188be09a5886f79ff0ea1c4.tar.bz2 ck-405afc36e0929d887188be09a5886f79ff0ea1c4.zip |
Standarize error codes
Diffstat (limited to 'src/actionhelper.c')
-rw-r--r-- | src/actionhelper.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/actionhelper.c b/src/actionhelper.c index 5007b62..9710ef8 100644 --- a/src/actionhelper.c +++ b/src/actionhelper.c @@ -160,53 +160,53 @@ ListOpt list_make_options(cklist *args) { /* PRINT RESULTS */ /*****************/ -void print_INIT_result(int ok) { - if (ok) { +void print_INIT_result(int err) { + if (!err) { printf("Initialized empty ckdb.\n"); } } -void print_ADD_result(int ok) { - if (ok) { +void print_ADD_result(int err) { + if (!err) { printf("ckdb updated succesfully.\n"); return; } printf("Could not complete add transaction.\n"); } -void print_DEL_result(int ok) { - if (ok) { +void print_DEL_result(int err) { + if (!err) { printf("succes\n"); return; } printf("Not Supported\n"); } -void print_EDIT_result(int ok) { - if (ok) { +void print_EDIT_result(int err) { + if (!err) { printf("succes\n"); return; } printf("failure\n"); } -void print_LIST_result(int ok) { - if (ok) { +void print_LIST_result(int err) { + if (!err) { return; } printf("Wrong list arguments\n"); } -void print_SEARCH_result(int ok) { - if (ok) { +void print_SEARCH_result(int err) { + if (!err) { printf("succes\n"); return; } printf("Not Supported\n"); } -void print_HELP_result(int ok) { - if (ok) { +void print_HELP_result(int err) { + if (!err) { printf("succes\n"); return; } |