From b84f667e9312611536a564700daea11c12b6fcfa Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Sun, 5 Oct 2014 06:52:24 -0700 Subject: [PATCH] further cleanup memcpy fortify implementation Change-Id: I0380f3c8ca8f9bb8a206accd839c32c9daf13c56 --- libc/include/string.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libc/include/string.h b/libc/include/string.h index f3dca1b16..fb2480878 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -115,11 +115,7 @@ extern char* basename(const char*) __RENAME(__gnu_basename) __nonnull((1)); __BIONIC_FORTIFY_INLINE void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) { - char *d = (char *) dest; - const char *s = (const char *) src; - size_t d_len = __bos0(d); - - return __builtin___memcpy_chk(dest, src, copy_amount, d_len); + return __builtin___memcpy_chk(dest, src, copy_amount, __bos0(dest)); } __BIONIC_FORTIFY_INLINE