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:
Daniel Eischen 2002-02-09 19:48:55 +00:00
parent 7f28386a26
commit b68bb42b5c

View File

@ -44,7 +44,8 @@ _sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr,
off_t *sbytes, int flags) off_t *sbytes, int flags)
{ {
struct pthread *curthread = _get_curthread(); struct pthread *curthread = _get_curthread();
int ret, type, blocking; int type, blocking;
int ret = 0;
ssize_t wvret, num = 0; ssize_t wvret, num = 0;
off_t n, nwritten = 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; *sbytes = nwritten + num;
} }
return ret; return (ret);
} }