change uc_hook_del() to take hook handle by value

This commit is contained in:
Jonathon Reinhart 2015-08-26 07:36:20 -04:00
parent ad59de2b51
commit 20bdbf638d
2 changed files with 2 additions and 6 deletions

View File

@ -382,7 +382,7 @@ uc_err uc_hook_add(struct uc_struct *uc, uc_hook_h *hh, uc_hook_t type, void *ca
for detailed error). for detailed error).
*/ */
UNICORN_EXPORT UNICORN_EXPORT
uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h *hh); uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h hh);
/* /*
Map memory in for emulation. Map memory in for emulation.

6
uc.c
View File

@ -649,12 +649,8 @@ uc_err uc_hook_add(struct uc_struct *uc, uc_hook_h *hh, uc_hook_t type, void *ca
} }
UNICORN_EXPORT UNICORN_EXPORT
uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h *hh) uc_err uc_hook_del(struct uc_struct *uc, uc_hook_h hh)
{ {
if (*hh == 0)
// invalid handle
return UC_ERR_HANDLE;
return hook_del(uc, hh); return hook_del(uc, hh);
} }