From c6bba81ef082232211d9f8573dfbf17d7505d871 Mon Sep 17 00:00:00 2001 From: pjd Date: Fri, 20 Apr 2007 19:00:43 +0000 Subject: [PATCH] Fix length calculation. --- tools/regression/sockets/sendfile/sendfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/regression/sockets/sendfile/sendfile.c b/tools/regression/sockets/sendfile/sendfile.c index 0ede7a22331e..960d7e777d60 100644 --- a/tools/regression/sockets/sendfile/sendfile.c +++ b/tools/regression/sockets/sendfile/sendfile.c @@ -231,7 +231,7 @@ send_test(int connect_socket, u_int32_t header_length, u_int32_t offset, if (fstat(file_fd, &sb) < 0) err(1, "fstat"); - length = sb.st_size; + length = sb.st_size - offset; } if (off != length) {