fortify: remove last uses of __bos_trivially_not*
Since we're using the gt/ge ones a lot now, having `not` versions
probably just adds to confusion. Swap out their remaining uses and
delete them.
Bug: 141267932
Test: m checkbuild on internal-master
Change-Id: I2107ae65007a4995e4fa23371fefe4db7547f43b
diff --git a/libc/include/bits/fortify/string.h b/libc/include/bits/fortify/string.h
index 5fdbe2a..bd36483 100644
--- a/libc/include/bits/fortify/string.h
+++ b/libc/include/bits/fortify/string.h
@@ -46,7 +46,7 @@
void* memcpy(void* const dst __pass_object_size0, const void* src, size_t copy_amount)
__overloadable {
size_t bos_dst = __bos0(dst);
- if (__bos_trivially_not_lt(bos_dst, copy_amount)) {
+ if (__bos_trivially_ge(bos_dst, copy_amount)) {
return __builtin_memcpy(dst, src, copy_amount);
}
return __builtin___memcpy_chk(dst, src, copy_amount, bos_dst);
@@ -56,7 +56,7 @@
__BIONIC_FORTIFY_INLINE
void* memmove(void* const dst __pass_object_size0, const void* src, size_t len) __overloadable {
size_t bos_dst = __bos0(dst);
- if (__bos_trivially_not_lt(bos_dst, len)) {
+ if (__bos_trivially_ge(bos_dst, len)) {
return __builtin_memmove(dst, src, len);
}
return __builtin___memmove_chk(dst, src, len, bos_dst);
@@ -71,7 +71,7 @@
__clang_error_if(__bos_unevaluated_lt(__bos0(dst), copy_amount),
"'mempcpy' called with size bigger than buffer") {
size_t bos_dst = __bos0(dst);
- if (__bos_trivially_not_lt(bos_dst, copy_amount)) {
+ if (__bos_trivially_ge(bos_dst, copy_amount)) {
return __builtin_mempcpy(dst, src, copy_amount);
}
return __builtin___mempcpy_chk(dst, src, copy_amount, bos_dst);