aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/__FD_chk.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-10-15 16:43:38 -0700
committerElliott Hughes <enh@google.com>2013-10-15 16:49:28 -0700
commitd1eda33f012e46083b91e087fb79d14a5ce70f0e (patch)
tree2d075e9d43c3a300327e79ee27c5b8330d8dce4c /libc/bionic/__FD_chk.cpp
parentdc9d8d050a43e1cd32f1337e79187124bb15d938 (diff)
downloadandroid_bionic-d1eda33f012e46083b91e087fb79d14a5ce70f0e.tar.gz
android_bionic-d1eda33f012e46083b91e087fb79d14a5ce70f0e.tar.bz2
android_bionic-d1eda33f012e46083b91e087fb79d14a5ce70f0e.zip
Avoid confusing "read prevented write" log messages.
Moving to a "function: message" style avoids ambiguity. Change-Id: If9d590e50265c61725d3673bd03796e65edd2d5e
Diffstat (limited to 'libc/bionic/__FD_chk.cpp')
-rw-r--r--libc/bionic/__FD_chk.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libc/bionic/__FD_chk.cpp b/libc/bionic/__FD_chk.cpp
index 5c2338d5f..af8427a67 100644
--- a/libc/bionic/__FD_chk.cpp
+++ b/libc/bionic/__FD_chk.cpp
@@ -32,39 +32,39 @@
extern "C" int __FD_ISSET_chk(int fd, fd_set* set, size_t set_size) {
if (__predict_false(fd < 0)) {
- __fortify_chk_fail("file descriptor is negative for FD_ISSET", 0);
+ __fortify_chk_fail("FD_ISSET: file descriptor < 0", 0);
}
if (__predict_false(fd >= FD_SETSIZE)) {
- __fortify_chk_fail("file descriptor is too big for FD_ISSET", 0);
+ __fortify_chk_fail("FD_ISSET: file descriptor >= FD_SETSIZE", 0);
}
if (__predict_false(set_size < sizeof(fd_set))) {
- __fortify_chk_fail("set is too small", 0);
+ __fortify_chk_fail("FD_ISSET: set is too small", 0);
}
return FD_ISSET(fd, set);
}
extern "C" void __FD_CLR_chk(int fd, fd_set* set, size_t set_size) {
if (__predict_false(fd < 0)) {
- __fortify_chk_fail("file descriptor is negative for FD_CLR", 0);
+ __fortify_chk_fail("FD_CLR: file descriptor < 0", 0);
}
if (__predict_false(fd >= FD_SETSIZE)) {
- __fortify_chk_fail("file descriptor is too big for FD_CLR", 0);
+ __fortify_chk_fail("FD_CLR: file descriptor >= FD_SETSIZE", 0);
}
if (__predict_false(set_size < sizeof(fd_set))) {
- __fortify_chk_fail("set is too small", 0);
+ __fortify_chk_fail("FD_CLR: set is too small", 0);
}
FD_CLR(fd, set);
}
extern "C" void __FD_SET_chk(int fd, fd_set* set, size_t set_size) {
if (__predict_false(fd < 0)) {
- __fortify_chk_fail("file descriptor is negative for FD_SET", 0);
+ __fortify_chk_fail("FD_SET: file descriptor < 0", 0);
}
if (__predict_false(fd >= FD_SETSIZE)) {
- __fortify_chk_fail("file descriptor is too big for FD_SET", 0);
+ __fortify_chk_fail("FD_SET: file descriptor >= FD_SETSIZE", 0);
}
if (__predict_false(set_size < sizeof(fd_set))) {
- __fortify_chk_fail("set is too small", 0);
+ __fortify_chk_fail("FD_SET: set is too small", 0);
}
FD_SET(fd, set);
}