diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-08-05 07:15:18 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-08-05 07:16:45 +0000 |
commit | d8206ed74a4e40a92216ab8e125ec13faa782232 (patch) | |
tree | 827acad011a3b2f7fdd433783c72e76dab8b38b6 /main/ca-certificates/update-ca.c | |
parent | 5ddb7c952fe6e059a75a2abd20e9f7955ec76e79 (diff) | |
download | aports-d8206ed74a4e40a92216ab8e125ec13faa782232.tar.bz2 aports-d8206ed74a4e40a92216ab8e125ec13faa782232.tar.xz |
main/ca-certificates: fix fallback for sendfile(2)
fix return value and errno check
Diffstat (limited to 'main/ca-certificates/update-ca.c')
-rw-r--r-- | main/ca-certificates/update-ca.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/ca-certificates/update-ca.c b/main/ca-certificates/update-ca.c index 4451217e7a..034ce6feb1 100644 --- a/main/ca-certificates/update-ca.c +++ b/main/ca-certificates/update-ca.c @@ -144,7 +144,7 @@ copyfile(const char* source, int output) } result = sendfile(output, in_fd, &bytes, fileinfo.st_size); - if (result == EINVAL || result == ENOSYS) + if ((result == -1) && (errno == EINVAL || errno == ENOSYS)) result = buffered_copyfd(in_fd, output, fileinfo.st_size); close(in_fd); |