diff options
author | Zeex <zeex@rocketmail.com> | 2016-07-24 11:40:10 +0600 |
---|---|---|
committer | Zeex <zeex@rocketmail.com> | 2016-07-24 11:40:10 +0600 |
commit | d2a5756f49082d837b3119671ee2f59e794e3166 (patch) | |
tree | 1dc08bf54565bf70b70efccc0a373d553f64e53d | |
parent | 384cb358b0944e2f07d6233532c04278f1b485c7 (diff) | |
download | subhook-d2a5756f49082d837b3119671ee2f59e794e3166.zip subhook-d2a5756f49082d837b3119671ee2f59e794e3166.tar.gz subhook-d2a5756f49082d837b3119671ee2f59e794e3166.tar.bz2 |
Minor cleanup
-rw-r--r-- | subhook_x86.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/subhook_x86.c b/subhook_x86.c index c908c63..2a3ab08 100644 --- a/subhook_x86.c +++ b/subhook_x86.c @@ -236,9 +236,9 @@ static size_t subhook_disasm(void *src, int32_t *reloc_op_offset) { return len; } -static size_t subhook_get_jmp_size(subhook_t hook) { +static size_t subhook_get_jmp_size(subhook_options_t options) { #if SUBHOOK_BITS == 64 - if ((hook->options & SUBHOOK_OPTION_64BIT_OFFSET) != 0) { + if ((options & SUBHOOK_OPTION_64BIT_OFFSET) != 0) { return sizeof(struct subhook_jmp64); } #endif @@ -343,7 +343,7 @@ SUBHOOK_EXPORT subhook_t SUBHOOK_API subhook_new(void *src, hook->src = src; hook->dst = dst; hook->options = options; - hook->jmp_size = subhook_get_jmp_size(hook); + hook->jmp_size = subhook_get_jmp_size(hook->options); hook->trampoline_size = hook->jmp_size + MAX_INSN_LEN - 1; hook->trampoline_len = 0; |