Silence a warning by initializing the return value. This wasn't
set in the case of a short write, and I think returning 0 for this is what was intended.
This commit is contained in:
parent
7f28386a26
commit
b68bb42b5c
@ -44,7 +44,8 @@ _sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr,
|
||||
off_t *sbytes, int flags)
|
||||
{
|
||||
struct pthread *curthread = _get_curthread();
|
||||
int ret, type, blocking;
|
||||
int type, blocking;
|
||||
int ret = 0;
|
||||
ssize_t wvret, num = 0;
|
||||
off_t n, nwritten = 0;
|
||||
|
||||
@ -186,5 +187,5 @@ _sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr,
|
||||
*/
|
||||
*sbytes = nwritten + num;
|
||||
}
|
||||
return ret;
|
||||
return (ret);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user