From 925b5882e6c3b89a5f11efd2a1dc12bff8d63502 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 31 Aug 2019 16:16:07 +0100 Subject: [PATCH] Use EXIT_{SUCCESS,FAILURE} constants --- misc-natives/src/main/c/jagmisc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/misc-natives/src/main/c/jagmisc.c b/misc-natives/src/main/c/jagmisc.c index 946f3c6..1ba6f69 100644 --- a/misc-natives/src/main/c/jagmisc.c +++ b/misc-natives/src/main/c/jagmisc.c @@ -2,6 +2,7 @@ #include #include +#include #include #include @@ -35,12 +36,12 @@ static DWORD WINAPI jagmisc_run(LPVOID parameter) { CloseHandle(thread); if (!success) { - return 1; + return EXIT_FAILURE; } /* notify Java_jagex3_jagmisc_jagmisc_init() that the thread has started successfully */ if (!SetEvent(jagmisc_start_event)) { - return 1; + return EXIT_FAILURE; } /* serve time request and stop events */ @@ -56,13 +57,13 @@ static DWORD WINAPI jagmisc_run(LPVOID parameter) { } if (!SetEvent(jagmisc_time_ready_event)) { - return 1; + return EXIT_FAILURE; } break; case WAIT_OBJECT_1: - return 0; + return EXIT_SUCCESS; default: - return 1; + return EXIT_FAILURE; } } }