summaryrefslogtreecommitdiffstats
path: root/lib/libc_r
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2002-02-09 19:48:55 +0000
committerdeischen <deischen@FreeBSD.org>2002-02-09 19:48:55 +0000
commit04de78234927ede2f34f9b1286fb8344dafa63fc (patch)
treee4a0934f310d2fa3486c084cbf6212bafd1409ad /lib/libc_r
parent863a49b9088de4fedd147eb5fcc111523c79dbfc (diff)
downloadFreeBSD-src-04de78234927ede2f34f9b1286fb8344dafa63fc.zip
FreeBSD-src-04de78234927ede2f34f9b1286fb8344dafa63fc.tar.gz
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.
Diffstat (limited to 'lib/libc_r')
-rw-r--r--lib/libc_r/uthread/uthread_sendfile.c5
1 files changed, 3 insertions, 2 deletions
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);
}
OpenPOWER on IntegriCloud