From 04de78234927ede2f34f9b1286fb8344dafa63fc Mon Sep 17 00:00:00 2001 From: deischen Date: Sat, 9 Feb 2002 19:48:55 +0000 Subject: 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. --- lib/libc_r/uthread/uthread_sendfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libc_r') diff --git a/lib/libc_r/uthread/uthread_sendfile.c b/lib/libc_r/uthread/uthread_sendfile.c index 9f8c1cf..901d523 100644 --- a/lib/libc_r/uthread/uthread_sendfile.c +++ b/lib/libc_r/uthread/uthread_sendfile.c @@ -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); } -- cgit v1.1