From d2ac83c4e520e7cc9563656b87fa34c9b849a23d Mon Sep 17 00:00:00 2001 From: Zeex Date: Tue, 31 Oct 2017 06:03:26 +0600 Subject: Replace 0 with NULL --- subhook_x86.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'subhook_x86.c') diff --git a/subhook_x86.c b/subhook_x86.c index 1d87b47..688fb88 100644 --- a/subhook_x86.c +++ b/subhook_x86.c @@ -50,13 +50,6 @@ #include #endif -#ifndef true - #define true 1 -#endif -#ifndef false - #define false 0 -#endif - #define MAX_INSN_LEN 15 /* maximum length of x86 instruction */ #define JMP_OPCODE 0xE9 @@ -444,7 +437,7 @@ SUBHOOK_EXPORT subhook_t SUBHOOK_API subhook_new(void *src, } SUBHOOK_EXPORT void SUBHOOK_API subhook_free(subhook_t hook) { - if (!hook) { + if (hook == NULL) { return; } free(hook->trampoline); @@ -455,7 +448,7 @@ SUBHOOK_EXPORT void SUBHOOK_API subhook_free(subhook_t hook) { SUBHOOK_EXPORT int SUBHOOK_API subhook_install(subhook_t hook) { int error; - if (!hook) { + if (hook == NULL) { return -EINVAL; } if (hook->installed) { @@ -472,7 +465,7 @@ SUBHOOK_EXPORT int SUBHOOK_API subhook_install(subhook_t hook) { } SUBHOOK_EXPORT int SUBHOOK_API subhook_remove(subhook_t hook) { - if (!hook) { + if (hook == NULL) { return -EINVAL; } if (!hook->installed) { -- cgit v1.1