Use EXIT_{SUCCESS,FAILURE} constants

pull/48/head
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 <stdint.h>
#include <stdlib.h>
#include <windows.h>
#include <VersionHelpers.h>
@ -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;
}
}
}

Loading…
Cancel
Save