Nullability check for sendfile module.

Bugs: b/245972273
Test: adb shell
Change-Id: I47d116b1faf7d53ac51589e393a3df96874a4f37
This commit is contained in:
zijunzhao 2023-04-14 01:06:35 +00:00
parent 05a48064c8
commit e14f2f9f20
1 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ __BEGIN_DECLS
/* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md */
#if defined(__USE_FILE_OFFSET64)
ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count) __RENAME(sendfile64) __INTRODUCED_IN(21);
ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count) __RENAME(sendfile64) __INTRODUCED_IN(21);
#else
/**
* [sendfile(2)](http://man7.org/linux/man-pages/man2/sendfile.2.html) copies data directly
@ -50,13 +50,13 @@ ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count) __R
*
* Available since API level 21.
*/
ssize_t sendfile(int __out_fd, int __in_fd, off_t* __offset, size_t __count);
ssize_t sendfile(int __out_fd, int __in_fd, off_t* _Nullable __offset, size_t __count);
#endif
/**
* Like sendfile() but allows using a 64-bit offset
* even from a 32-bit process without `__FILE_OFFSET_BITS=64`.
*/
ssize_t sendfile64(int __out_fd, int __in_fd, off64_t* __offset, size_t __count) __INTRODUCED_IN(21);
ssize_t sendfile64(int __out_fd, int __in_fd, off64_t* _Nullable __offset, size_t __count) __INTRODUCED_IN(21);
__END_DECLS