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/__strlen_chk.cpp b/libc/bionic/__strlen_chk.cpp
index 6ebf09c..151a497 100644
--- a/libc/bionic/__strlen_chk.cpp
+++ b/libc/bionic/__strlen_chk.cpp
@@ -56,7 +56,7 @@
extern "C" size_t __strlen_chk(const char *s, size_t s_len) {
size_t ret = strlen(s);
- if (__builtin_expect(ret >= s_len, 0)) {
+ if (__predict_false(ret >= s_len)) {
__fortify_chk_fail("strlen read overflow", 0);
}