]> git.pond.sub.org Git - empserver/commitdiff
"(turn): Fix comparing the output of write() to an unsigned sizeof by
authorMarc Olzheim <marcolz@stack.nl>
Fri, 17 Dec 2004 15:39:28 +0000 (15:39 +0000)
committerMarc Olzheim <marcolz@stack.nl>
Fri, 17 Dec 2004 15:39:28 +0000 (15:39 +0000)
casting the sizeof to write's most used return-type (ssize_t). Introduce
a typedef for ssize_t for WIN32."

src/lib/commands/turn.c

index 4344b9837386129943ace4926f66d7655caa3008..d731c5cd9ad10cf7bd696d2dc930734a8c98f807 100644 (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))
     {