From 405afc36e0929d887188be09a5886f79ff0ea1c4 Mon Sep 17 00:00:00 2001 From: gramanas Date: Sat, 22 Sep 2018 12:58:22 +0300 Subject: Standarize error codes --- src/actionhelper.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/actionhelper.c') 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; } -- cgit v1.2.3