summaryrefslogtreecommitdiff
path: root/libc/include/bits/fortify/stdlib.h
diff options
context:
space:
mode:
authorSteven Laver <lavers@google.com>2019-08-07 15:49:43 -0700
committerSteven Laver <lavers@google.com>2019-08-07 15:49:43 -0700
commitbfda022dd6fbbcea60e9f52496d90ece514b32da (patch)
tree97c69d2bdd0e0ff59d55a0d2a8596ed678cded3e /libc/include/bits/fortify/stdlib.h
parent70ebd716b3e81d304cda14d2bd77996cc2840962 (diff)
parent848e1d8a30a3465040edc27085927309fe6cbcff (diff)
Merge RP1A.190528.001
Change-Id: If6e905407e26a19e0266185af46b4ff461c4d45e
Diffstat (limited to 'libc/include/bits/fortify/stdlib.h')
-rw-r--r--libc/include/bits/fortify/stdlib.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/include/bits/fortify/stdlib.h b/libc/include/bits/fortify/stdlib.h
index d47c0b02a..0bb3d0d66 100644
--- a/libc/include/bits/fortify/stdlib.h
+++ b/libc/include/bits/fortify/stdlib.h
@@ -31,18 +31,16 @@
#endif
#if defined(__BIONIC_FORTIFY)
-#define __realpath_buf_too_small_str \
- "'realpath' output parameter must be NULL or a pointer to a buffer with >= PATH_MAX bytes"
/* PATH_MAX is unavailable without polluting the namespace, but it's always 4096 on Linux */
#define __PATH_MAX 4096
char* realpath(const char* path, char* resolved)
- __clang_error_if(__bos(resolved) != __BIONIC_FORTIFY_UNKNOWN_SIZE &&
- __bos(resolved) < __PATH_MAX, __realpath_buf_too_small_str)
+ __clang_error_if(__bos_unevaluated_lt(__bos(resolved), __PATH_MAX),
+ "'realpath' output parameter must be NULL or a pointer to a buffer "
+ "with >= PATH_MAX bytes")
__clang_error_if(!path, "'realpath': NULL path is never correct; flipped arguments?");
/* No need for a definition; the only issues we can catch are at compile-time. */
#undef __PATH_MAX
-#undef __realpath_buf_too_small_str
#endif /* defined(__BIONIC_FORTIFY) */