git.samba.org
/
kai
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2b150e
)
Don't zero out numwritten before using.... Found by Pierre Belanger belanger@pobox.com
author
Jeremy Allison
<jra@samba.org>
Mon, 30 Sep 2002 05:19:43 +0000
(
05:19
+0000)
committer
Jeremy Allison
<jra@samba.org>
Mon, 30 Sep 2002 05:19:43 +0000
(
05:19
+0000)
Jeremy.
(This used to be commit
a7009ad5c8aaae350b2521b8c0cd2538e561618a
)
source3/lib/sendfile.c
patch
|
blob
|
history
diff --git
a/source3/lib/sendfile.c
b/source3/lib/sendfile.c
index 98a52608b8dae70837993b3cf19b2ddf5ee623e0..5d1cf2f10bc1b465a6c6ab183f6d9a39b3a6c13c 100644
(file)
--- a/
source3/lib/sendfile.c
+++ b/
source3/lib/sendfile.c
@@
-208,10
+208,10
@@
ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
hdtrl[0].iov_base = NULL;
hdtrl[0].iov_len = 0;
} else {
- nwritten = 0;
/* iov_base is defined as a void *... */
hdtrl[0].iov_base = ((char *)hdtrl[0].iov_base) + nwritten;
hdtrl[0].iov_len -= nwritten;
+ nwritten = 0;
}
}
total -= nwritten;
@@
-280,9
+280,9
@@
ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of
hdtrl.iov_base = NULL;
hdtrl.iov_len = 0;
} else {
- nwritten = 0;
hdtrl.iov_base += nwritten;
hdtrl.iov_len -= nwritten;
+ nwritten = 0;
}
}
total -= nwritten;