Ehooks: Fix a build warning.

We wrote `return some_void_func()` in a function returning void, which is
confusing and triggers warnings on MSVC.
This commit is contained in:
David T. Goldblatt 2020-02-25 07:47:04 -08:00 committed by David Goldblatt
parent bc31041edb
commit 9f4fc27389

View File

@ -222,9 +222,9 @@ ehooks_destroy(tsdn_t *tsdn, ehooks_t *ehooks, void *addr, size_t size,
bool committed) { bool committed) {
extent_hooks_t *extent_hooks = ehooks_get_extent_hooks_ptr(ehooks); extent_hooks_t *extent_hooks = ehooks_get_extent_hooks_ptr(ehooks);
if (extent_hooks == &ehooks_default_extent_hooks) { if (extent_hooks == &ehooks_default_extent_hooks) {
return ehooks_default_destroy_impl(addr, size); ehooks_default_destroy_impl(addr, size);
} else if (extent_hooks->destroy == NULL) { } else if (extent_hooks->destroy == NULL) {
return; /* Do nothing. */
} else { } else {
ehooks_pre_reentrancy(tsdn); ehooks_pre_reentrancy(tsdn);
extent_hooks->destroy(extent_hooks, addr, size, committed, extent_hooks->destroy(extent_hooks, addr, size, committed,