Skip to content

Commit

Permalink
Fix a sign comparison warning
Browse files Browse the repository at this point in the history
  • Loading branch information
b4n committed May 21, 2014
1 parent 894207d commit 3d549f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socket.c
Expand Up @@ -205,15 +205,15 @@ static void socket_get_document_list(gint sock)

do
{
n_read = socket_fd_read(sock, buf, sizeof(buf));
n_read = socket_fd_read(sock, buf, BUFFER_LENGTH);
/* if we received ETX (end-of-text), there is nothing else to read, so cut that
* byte not to output it and to be sure not to validate the loop condition */
if (n_read > 0 && buf[n_read - 1] == '\3')
n_read--;
if (n_read > 0)
fwrite(buf, 1, n_read, stdout);
}
while (n_read >= sizeof(buf));
while (n_read >= BUFFER_LENGTH);
}


Expand Down

0 comments on commit 3d549f5

Please sign in to comment.