diff options
author | Zeex <zeex@rocketmail.com> | 2017-10-31 06:03:26 +0600 |
---|---|---|
committer | Zeex <zeex@rocketmail.com> | 2017-10-31 06:03:26 +0600 |
commit | d2ac83c4e520e7cc9563656b87fa34c9b849a23d (patch) | |
tree | 3a7a1dd1b5771b41023ce8feb658f17000983508 /subhook_x86.c | |
parent | 062797527ddc6fc60db578cab30ee2daeb199d1b (diff) | |
download | subhook-d2ac83c4e520e7cc9563656b87fa34c9b849a23d.zip subhook-d2ac83c4e520e7cc9563656b87fa34c9b849a23d.tar.gz subhook-d2ac83c4e520e7cc9563656b87fa34c9b849a23d.tar.bz2 |
Replace 0 with NULL
Diffstat (limited to 'subhook_x86.c')
-rw-r--r-- | subhook_x86.c | 13 |
1 files changed, 3 insertions, 10 deletions
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 <stdint.h> #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) { |