summaryrefslogtreecommitdiffstats
path: root/libc/include
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2014-10-05 06:52:24 -0700
committerElliott Hughes <enh@google.com>2014-10-06 16:18:32 -0700
commitdb408bf421faffe6c0623ca652844edfffa3726c (patch)
treeacb9e0a7853ab4309f02dbe2e308d658e60a4fe4 /libc/include
parent7ad2147a08b000e4bb6101bd24f055552f7a41aa (diff)
downloadbionic-db408bf421faffe6c0623ca652844edfffa3726c.zip
bionic-db408bf421faffe6c0623ca652844edfffa3726c.tar.gz
bionic-db408bf421faffe6c0623ca652844edfffa3726c.tar.bz2
further cleanup memcpy fortify implementation
Bug: 17784968 (cherry picked from commit b84f667e9312611536a564700daea11c12b6fcfa) Change-Id: I68fc2cc0a1ee7f0887edf3681eb83ef678de1383
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/string.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/libc/include/string.h b/libc/include/string.h
index 6384d57..3d08371 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -96,11 +96,7 @@ extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale
__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