From f0583d8b7352d5cefb8bd2cfa55ab348f6f9d7c2 Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Thu, 17 Nov 2005 12:53:44 +0000 Subject: [PATCH] fixed unsigned compare git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@851 152afb58-edef-0310-8abb-c4023f1b3aa9 --- src/network_openssl.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/network_openssl.c b/src/network_openssl.c index 65aa0bd5..b6a1b2f6 100644 --- a/src/network_openssl.c +++ b/src/network_openssl.c @@ -147,8 +147,6 @@ int network_write_chunkqueue_openssl(server *srv, connection *con, SSL *ssl, chu case FILE_CHUNK: { char *s; ssize_t r; - off_t offset; - size_t toSend; stat_cache_entry *sce = NULL; int ifd; int write_wait = 0; @@ -165,13 +163,13 @@ int network_write_chunkqueue_openssl(server *srv, connection *con, SSL *ssl, chu } do { - offset = c->file.start + c->offset; - toSend = c->file.length - c->offset; + off_t offset = c->file.start + c->offset; + off_t toSend = c->file.length - c->offset; if (toSend > LOCAL_SEND_BUFSIZE) toSend = LOCAL_SEND_BUFSIZE; if (-1 == (ifd = open(c->file.name->ptr, O_RDONLY))) { - log_error_write(srv, __FILE__, __LINE__, "ss", "open failed: ", strerror(errno)); + log_error_write(srv, __FILE__, __LINE__, "ss", "open failed:", strerror(errno)); return -1; } @@ -180,7 +178,7 @@ int network_write_chunkqueue_openssl(server *srv, connection *con, SSL *ssl, chu lseek(ifd, offset, SEEK_SET); if (-1 == (toSend = read(ifd, local_send_buffer, toSend))) { close(ifd); - log_error_write(srv, __FILE__, __LINE__, "ss", "read failed: ", strerror(errno)); + log_error_write(srv, __FILE__, __LINE__, "ss", "read failed:", strerror(errno)); return -1; }