Accept NULL for fds parameter in poll.
* Some callers, e.g. external/curl/lib/select.c, do poll(NULL, 0, ...) and get clang-diagnostic-nonnull check error. Test: build with WITH_TIDY=1 Bug: 111850071 Change-Id: I7ea433d185cb84011a954f05964181b5518febd4
This commit is contained in:
parent
4b9379c889
commit
4be542629a
|
@ -49,7 +49,7 @@ typedef unsigned int nfds_t;
|
|||
* Returns the number of ready file descriptors on success, 0 for timeout,
|
||||
* and returns -1 and sets `errno` on failure.
|
||||
*/
|
||||
int poll(struct pollfd* _Nonnull __fds, nfds_t __count, int __timeout_ms);
|
||||
int poll(struct pollfd* _Nullable __fds, nfds_t __count, int __timeout_ms);
|
||||
|
||||
/**
|
||||
* [ppoll(3)](http://man7.org/linux/man-pages/man3/ppoll.3.html) waits on a set of file descriptors
|
||||
|
@ -61,12 +61,12 @@ int poll(struct pollfd* _Nonnull __fds, nfds_t __count, int __timeout_ms);
|
|||
*
|
||||
* Available since API level 28.
|
||||
*/
|
||||
int ppoll(struct pollfd* _Nonnull __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset_t* _Nullable __mask) __INTRODUCED_IN(21);
|
||||
int ppoll(struct pollfd* _Nullable __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset_t* _Nullable __mask) __INTRODUCED_IN(21);
|
||||
|
||||
/**
|
||||
* Like ppoll() but allows setting a signal mask with RT signals even from a 32-bit process.
|
||||
*/
|
||||
int ppoll64(struct pollfd* _Nonnull __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset64_t* _Nullable __mask) __INTRODUCED_IN(28);
|
||||
int ppoll64(struct pollfd* _Nullable __fds, nfds_t __count, const struct timespec* _Nullable __timeout, const sigset64_t* _Nullable __mask) __INTRODUCED_IN(28);
|
||||
|
||||
#if defined(__BIONIC_INCLUDE_FORTIFY_HEADERS)
|
||||
#define _POLL_H_
|
||||
|
|
Loading…
Reference in New Issue