[hackers] [quark] Use ssize_t for read- and write-return-values || FRIGN

From: <git_AT_suckless.org>
Date: Fri, 08 Aug 2014 14:21:53 +0200

commit 68535cc04f312be662de3d6da59a8b7188d11bed
Author: FRIGN <dev_AT_frign.de>
Date: Fri Aug 8 14:23:12 2014 +0200

    Use ssize_t for read- and write-return-values

diff --git a/quark.c b/quark.c
index 72b135b..cbd7bc5 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -171,11 +171,11 @@ putresentry(int type, ...) {
 void
 responsefiledata(int fd, off_t size) {
         char buf[BUFSIZ];
- size_t n;
+ ssize_t n;
 
         for(; (n = read(fd, buf, MIN(size, sizeof buf))) > 0; size -= n)
                 if(write(req.fd, buf, n) != n)
- logerrmsg("error writing to client %s: %s
", host, strerror(errno));
+ logerrmsg("error writing to client %s at %ls: %s
", host, n, strerror(errno));
         if(n == -1)
                 logerrmsg("error reading from file: %s
", strerror(errno));
 }
Received on Fri Aug 08 2014 - 14:21:53 CEST

This archive was generated by hypermail 2.3.0 : Fri Aug 08 2014 - 14:24:08 CEST