aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-04-29 21:19:38 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-04-29 21:19:38 +0200
commiteccdc8a0ec894b6f525a026a1d10ef914b4bc034 (patch)
tree3540e3d5654217fd785cfc4be71474a9a019df0a
parentc07136de8a76708a021911339f7fdde56e7c3789 (diff)
downloadfetchmail-eccdc8a0ec894b6f525a026a1d10ef914b4bc034.tar.gz
fetchmail-eccdc8a0ec894b6f525a026a1d10ef914b4bc034.tar.bz2
fetchmail-eccdc8a0ec894b6f525a026a1d10ef914b4bc034.zip
Hack types for cygwin_read().
-rw-r--r--socket.c8
1 files 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);
}