summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTrutz Behn2015-05-20 22:09:46 +0200
committersin2015-05-21 10:10:17 +0100
commit720c4f7414c3c3d980de8e6ddbc0f608d3e9050d (patch)
treebaac1200edfb03d855308307a6fa46343096c4a2 /include
parenta81e053a1c4086c8f46e259cf2a76639b26957ee (diff)
Fix return-type of fortified FD_CLR and FD_SET
POSIX specifies them to have return-type void, not int.
Diffstat (limited to 'include')
-rw-r--r--include/sys/select.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/sys/select.h b/include/sys/select.h
index 01d0aa9..0f1e1df 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -25,23 +25,23 @@ extern "C" {
25#endif 25#endif
26 26
27static __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) 27static __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
28int __fortify_FD_CLR(int fd, fd_set *set) 28void __fortify_FD_CLR(int fd, fd_set *set)
29{ 29{
30 size_t bos = __builtin_object_size(set, 0); 30 size_t bos = __builtin_object_size(set, 0);
31 31
32 if (fd < 0 || fd >= FD_SETSIZE || bos < sizeof(fd_set)) 32 if (fd < 0 || fd >= FD_SETSIZE || bos < sizeof(fd_set))
33 __builtin_trap(); 33 __builtin_trap();
34 return FD_CLR(fd, set); 34 FD_CLR(fd, set);
35} 35}
36 36
37static __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__)) 37static __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
38int __fortify_FD_SET(int fd, fd_set *set) 38void __fortify_FD_SET(int fd, fd_set *set)
39{ 39{
40 size_t bos = __builtin_object_size(set, 0); 40 size_t bos = __builtin_object_size(set, 0);
41 41
42 if (fd < 0 || fd >= FD_SETSIZE || bos < sizeof(fd_set)) 42 if (fd < 0 || fd >= FD_SETSIZE || bos < sizeof(fd_set))
43 __builtin_trap(); 43 __builtin_trap();
44 return FD_SET(fd, set); 44 FD_SET(fd, set);
45} 45}
46 46
47#undef FD_CLR 47#undef FD_CLR