"(turn): Fix comparing the output of write() to an unsigned sizeof by

casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for WIN32."
This commit is contained in:
Marc Olzheim 2004-12-17 15:39:28 +00:00
parent 0ad644b11b
commit 09b73000c2

View file

@ -115,7 +115,7 @@ turn(void)
if (msgfilepath == downfil)
pr("Logins disabled.\n");
if ((write(fd, &tgm, sizeof(tgm)) < sizeof(tgm)) ||
if ((write(fd, &tgm, sizeof(tgm)) < (ssize_t)sizeof(tgm)) ||
(write(fd, buf, tgm.tel_length) < tgm.tel_length) ||
(close(fd) == -1))
{