From eccdc8a0ec894b6f525a026a1d10ef914b4bc034 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Thu, 29 Apr 2010 21:19:38 +0200 Subject: Hack types for cygwin_read(). --- socket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/socket.c b/socket.c index ad479a3b..a3adfd80 100644 --- a/socket.c +++ b/socket.c @@ -1069,17 +1069,17 @@ int SockClose(int sock) static ssize_t cygwin_read(int sock, void *buf, size_t count) { char *bp = buf; - int n = 0; + size_t n = 0; - if ((n = read(sock, bp, count)) == -1) + if ((n = read(sock, bp, count)) == (size_t)-1) return(-1); if (n != count) { - int n2 = 0; + size_t n2 = 0; if (outlevel >= O_VERBOSE) report(stdout, GT_("Cygwin socket read retry\n")); n2 = read(sock, bp + n, count - n); - if (n2 == -1 || n + n2 != count) { + if (n2 == (size_t)-1 || n + n2 != count) { report(stderr, GT_("Cygwin socket read retry failed!\n")); return(-1); } -- cgit v1.2.3