libs/nixio: fix uninitialized variable warning on Darwin in splice.c
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 29 Dec 2009 17:55:10 +0000 (17:55 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 29 Dec 2009 17:55:10 +0000 (17:55 +0000)
libs/nixio/src/splice.c

index 38a45c2..db63ea9 100644 (file)
@@ -145,6 +145,7 @@ static int nixio_sendfile(lua_State *L) {
        do {
 #ifdef __DARWIN__
                r = sendfile(infd, sock, offset, (off_t *)&len, NULL, 0);
+               spliced = r;
 #else
                r = sendfile(infd, sock, offset, len, NULL, &spliced, 0);
 #endif