From d578b6be6e7b4b54c899a6e8c6a06ffef64ba72a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Wed, 9 Jul 2014 12:24:21 +0200 Subject: [PATCH] Use EXIT_SUCCESS and EXIT_FAILURE instead of hardcoded errors --- main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; } -- 2.43.5