Use __predict_false on some fortify methods.
Give the compiler some hints that these error conditions
are unlikely to occur in practice.
Change-Id: Ifaf7322a12120ef663c8315c1a18c2dcbe4bda23
diff --git a/libc/bionic/__memmove_chk.cpp b/libc/bionic/__memmove_chk.cpp
index ff770b5..49a0597 100644
--- a/libc/bionic/__memmove_chk.cpp
+++ b/libc/bionic/__memmove_chk.cpp
@@ -44,7 +44,7 @@
extern "C" void *__memmove_chk (void *dest, const void *src,
size_t len, size_t dest_len)
{
- if (len > dest_len) {
+ if (__predict_false(len > dest_len)) {
__fortify_chk_fail("memmove buffer overflow",
BIONIC_EVENT_MEMMOVE_BUFFER_OVERFLOW);
}