fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit 720c4f7414c3c3d980de8e6ddbc0f608d3e9050d
parent a81e053a1c4086c8f46e259cf2a76639b26957ee
Author: Trutz Behn <me@trutz.be>
Date:   Wed, 20 May 2015 22:09:46 +0200

Fix return-type of fortified FD_CLR and FD_SET

POSIX specifies them to have return-type void, not int.

Diffstat:
Minclude/sys/select.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/sys/select.h b/include/sys/select.h @@ -25,23 +25,23 @@ extern "C" { #endif static __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) -int __fortify_FD_CLR(int fd, fd_set *set) +void __fortify_FD_CLR(int fd, fd_set *set) { size_t bos = __builtin_object_size(set, 0); if (fd < 0 || fd >= FD_SETSIZE || bos < sizeof(fd_set)) __builtin_trap(); - return FD_CLR(fd, set); + FD_CLR(fd, set); } static __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) -int __fortify_FD_SET(int fd, fd_set *set) +void __fortify_FD_SET(int fd, fd_set *set) { size_t bos = __builtin_object_size(set, 0); if (fd < 0 || fd >= FD_SETSIZE || bos < sizeof(fd_set)) __builtin_trap(); - return FD_SET(fd, set); + FD_SET(fd, set); } #undef FD_CLR