]> code.citadel.org Git - citadel.git/blobdiff - citadel/clientsocket.c
* more buffer size stuff
[citadel.git] / citadel / clientsocket.c
index a7a7e82c23445b7edff09c4428f8ad0d6294b66a..00039e5de49c9d449da76a0cbcb7b1772037d9c2 100644 (file)
@@ -138,13 +138,13 @@ int sock_gets(int sock, char *buf)
         */
        for (i = 0;; i++) {
                if (sock_read(sock, &buf[i], 1) < 0) return(-1);
-               if (buf[i] == '\n' || i == 255)
+               if (buf[i] == '\n' || i == (SIZ-1))
                        break;
        }
 
        /* If we got a long line, discard characters until the newline.
         */
-       if (i == 255)
+       if (i == (SIZ-1))
                while (buf[i] != '\n')
                        if (sock_read(sock, &buf[i], 1) < 0) return(-1);