Use EXIT_{SUCCESS,FAILURE} constants

master
Graham 5 years ago
parent 57012072a3
commit 2806bd301d
  1. 11
      misc-natives/src/main/c/jagmisc.c

@ -2,6 +2,7 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <windows.h> #include <windows.h>
#include <VersionHelpers.h> #include <VersionHelpers.h>
@ -35,12 +36,12 @@ static DWORD WINAPI jagmisc_run(LPVOID parameter) {
CloseHandle(thread); CloseHandle(thread);
if (!success) { if (!success) {
return 1; return EXIT_FAILURE;
} }
/* notify Java_jagex3_jagmisc_jagmisc_init() that the thread has started successfully */ /* notify Java_jagex3_jagmisc_jagmisc_init() that the thread has started successfully */
if (!SetEvent(jagmisc_start_event)) { if (!SetEvent(jagmisc_start_event)) {
return 1; return EXIT_FAILURE;
} }
/* serve time request and stop events */ /* serve time request and stop events */
@ -56,13 +57,13 @@ static DWORD WINAPI jagmisc_run(LPVOID parameter) {
} }
if (!SetEvent(jagmisc_time_ready_event)) { if (!SetEvent(jagmisc_time_ready_event)) {
return 1; return EXIT_FAILURE;
} }
break; break;
case WAIT_OBJECT_1: case WAIT_OBJECT_1:
return 0; return EXIT_SUCCESS;
default: default:
return 1; return EXIT_FAILURE;
} }
} }
} }

Loading…
Cancel
Save