From 6cdeed3124a453bb1e03cca04c8811dbf7a196a0 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 24 Apr 2020 17:08:41 -0700 Subject: [PATCH] malloc_hooks README.md: fix example compilation failures Bug: N/A Test: N/A Change-Id: I017f47990417446f1bff5fc7a5bf7e53e8e1f85e --- libc/malloc_hooks/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/malloc_hooks/README.md b/libc/malloc_hooks/README.md index b418e1ef4..1747e8d41 100644 --- a/libc/malloc_hooks/README.md +++ b/libc/malloc_hooks/README.md @@ -74,11 +74,11 @@ Example Implementation ====================== Below is a simple implementation intercepting only malloc/calloc calls. - void* new_malloc_hook(size_t bytes, const char* arg) { + void* new_malloc_hook(size_t bytes, const void* arg) { return orig_malloc_hook(bytes, arg); } - void orig_malloc_hook = __malloc_hook; + auto orig_malloc_hook = __malloc_hook; __malloc_hook = new_malloc_hook; Enabling Examples