diff options
author | Guo Ren <ren_guo@c-sky.com> | 2018-04-13 15:48:02 +0800 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2018-04-13 16:35:34 +0100 |
commit | b00fd230ed0b49b9f23d829ad5d09859f34bb754 (patch) | |
tree | afcf270b58848affea0dcb003dbaa8f3b6bdd608 | |
parent | f42d18f06084b6db90c104fb5404a91602e9b904 (diff) |
common/sendfile.c: bugfix can't support offset is NULL
In ltp testcase sendfile08.c, it use offset=NULL to test the api.
See "man sendfile" and it really support offset is NULL.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
-rw-r--r-- | libc/sysdeps/linux/common/sendfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/sendfile.c b/libc/sysdeps/linux/common/sendfile.c index af05ba4e7..def98da46 100644 --- a/libc/sysdeps/linux/common/sendfile.c +++ b/libc/sysdeps/linux/common/sendfile.c @@ -40,7 +40,7 @@ ssize_t sendfile(int out_fd, int in_fd, __off_t *offset, size_t count) return -1; } - if (offset == NULL || (int)offset < 0) { + if ((int)offset < 0) { __set_errno(EFAULT); return -1; } |