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/__umask_chk.cpp b/libc/bionic/__umask_chk.cpp
index ff67ed6..8fe95a2 100644
--- a/libc/bionic/__umask_chk.cpp
+++ b/libc/bionic/__umask_chk.cpp
@@ -42,7 +42,7 @@
* greater than 0.
*/
extern "C" mode_t __umask_chk(mode_t mode) {
- if ((mode & 0777) != mode) {
+ if (__predict_false((mode & 0777) != mode)) {
__fortify_chk_fail("umask called with invalid mask", 0);
}