diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-04-29 21:19:38 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-04-29 21:19:38 +0200 |
commit | eccdc8a0ec894b6f525a026a1d10ef914b4bc034 (patch) | |
tree | 3540e3d5654217fd785cfc4be71474a9a019df0a | |
parent | c07136de8a76708a021911339f7fdde56e7c3789 (diff) | |
download | fetchmail-eccdc8a0ec894b6f525a026a1d10ef914b4bc034.tar.gz fetchmail-eccdc8a0ec894b6f525a026a1d10ef914b4bc034.tar.bz2 fetchmail-eccdc8a0ec894b6f525a026a1d10ef914b4bc034.zip |
Hack types for cygwin_read().
-rw-r--r-- | socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); } |