summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/sendfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c
index df6c1980d0..98a52608b8 100644
--- a/source3/lib/sendfile.c
+++ b/source3/lib/sendfile.c
@@ -233,10 +233,10 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
struct iovec hdtrl;
size_t hdr_len = 0;
- hdr->headers = &hdtrl;
- hdr->hdr_cnt = 1;
- hdr->trailers = NULL;
- hdr->trl_cnt = 0;
+ hdr.headers = &hdtrl;
+ hdr.hdr_cnt = 1;
+ hdr.trailers = NULL;
+ hdr.trl_cnt = 0;
/* Set up the header iovec. */
if (header) {
@@ -274,7 +274,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
* We change nwritten to be the number of file bytes written.
*/
- if (hdtrl[0].iov_base && hdtrl.iov_len) {
+ if (hdtrl.iov_base && hdtrl.iov_len) {
if (nwritten >= hdtrl.iov_len) {
nwritten -= hdtrl.iov_len;
hdtrl.iov_base = NULL;