]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use __nonnull for the epoll_wait(2) family of syscalls
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 22 May 2023 22:01:21 +0000 (00:01 +0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 1 Jun 2023 17:50:42 +0000 (14:50 -0300)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
include/sys/epoll.h
sysdeps/unix/sysv/linux/sys/epoll.h

index 8049381a269956ce354dcb8977a5fef1ba5e0646..b23bc9c7c08b3627be2c74a24793a43c0650f47d 100644 (file)
@@ -9,7 +9,8 @@ libc_hidden_proto (epoll_pwait)
 #else
 extern int __epoll_pwait2_time64 (int fd, struct epoll_event *ev, int maxev,
                                  const struct __timespec64 *tmo,
-                                 const sigset_t *s);
+                                 const sigset_t *s)
+       __nonnull ((2));
 libc_hidden_proto (__epoll_pwait2_time64)
 #endif
 
index b17d344e794d033d54c2f8c3735406d6499f806c..23872c9438707f6a0761af363202c0c4c8553d45 100644 (file)
@@ -123,7 +123,7 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
    __THROW.  */
 extern int epoll_wait (int __epfd, struct epoll_event *__events,
                       int __maxevents, int __timeout)
-       __attr_access ((__write_only__, 2, 3));
+       __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
 
 
 /* Same as epoll_wait, but the thread's signal mask is temporarily
@@ -134,7 +134,7 @@ extern int epoll_wait (int __epfd, struct epoll_event *__events,
 extern int epoll_pwait (int __epfd, struct epoll_event *__events,
                        int __maxevents, int __timeout,
                        const __sigset_t *__ss)
-       __attr_access ((__write_only__, 2, 3));
+       __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
 
 /* Same as epoll_pwait, but the timeout as a timespec.
 
@@ -144,7 +144,7 @@ extern int epoll_pwait (int __epfd, struct epoll_event *__events,
 extern int epoll_pwait2 (int __epfd, struct epoll_event *__events,
                         int __maxevents, const struct timespec *__timeout,
                         const __sigset_t *__ss)
-       __attr_access ((__write_only__, 2, 3));
+       __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
 #else
 # ifdef __REDIRECT
 extern int __REDIRECT (epoll_pwait2, (int __epfd, struct epoll_event *__ev,
@@ -152,7 +152,7 @@ extern int __REDIRECT (epoll_pwait2, (int __epfd, struct epoll_event *__ev,
                                      const struct timespec *__timeout,
                                      const __sigset_t *__ss),
                       __epoll_pwait2_time64)
-       __attr_access ((__write_only__, 2, 3));
+       __attr_access ((__write_only__, 2, 3)) __nonnull ((2));
 # else
 #  define epoll_pwait2 __epoll_pwait2_time64
 # endif