From: Michal MalĂ˝ Date: Wed, 9 Jul 2014 10:24:21 +0000 (+0200) Subject: Use EXIT_SUCCESS and EXIT_FAILURE instead of hardcoded errors X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=d578b6be6e7b4b54c899a6e8c6a06ffef64ba72a;p=LFSBench.git Use EXIT_SUCCESS and EXIT_FAILURE instead of hardcoded errors --- diff --git a/main.c b/main.c index 9e0b979..eccd386 100644 --- a/main.c +++ b/main.c @@ -39,25 +39,25 @@ int main(int argc, char** argv) if (caps == NULL) { fprintf(stderr, "CRITICAL: Cannot get advanced capabilites status.\n"); - return -1; + return EXIT_FAILURE; } if (cap_get_flag(caps, CAP_DAC_READ_SEARCH, CAP_EFFECTIVE, &capfv) != 0) { fprintf(stderr, "CRITICAL: Cannot check capability flags.\n"); - return -1; + return EXIT_FAILURE; } if (capfv != CAP_SET) { fprintf(stderr, "CRITICAL: Capability CAP_DAC_READ_SEARCH is not set, this capability is required.\n"); cap_free(caps); - return -1; + return EXIT_FAILURE; } if (cap_get_flag(caps, CAP_SYS_PTRACE, CAP_EFFECTIVE, &capfv) != 0) { fprintf(stderr, "CRITICAL: Cannot check capability flags.\n"); - return -1; + return EXIT_FAILURE; } if (capfv != CAP_SET) { fprintf(stderr, "CRITICAL: Capability CAP_SYS_PTRACE is not set, this capability is required.\n"); cap_free(caps); - return -1; + return EXIT_FAILURE; } cap_free(caps); } @@ -117,7 +117,7 @@ int main(int argc, char** argv) pthread_mutex_destroy(&exit_mutex); free(evdev_path); - return 0; + return EXIT_SUCCESS; bail_out_3: pthread_join(win_event_loop, NULL); @@ -125,5 +125,5 @@ bail_out_2: pthread_mutex_destroy(&exit_mutex); bail_out_1: free(evdev_path); - return -1; + return EXIT_FAILURE; }