diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-03-31 23:12:34 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-03-31 23:12:34 +0200 |
commit | 114c45dfd54d904738b7efb7d402498773f1b75c (patch) | |
tree | 47ef468171981c891b64111f621b2034dfa48b50 | |
parent | 72afbb4ff98dee0a6f13a9edd3681b10cc566281 (diff) |
-rw-r--r-- | src/msnprotocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/msnprotocol.c b/src/msnprotocol.c index 680783e..658e429 100644 --- a/src/msnprotocol.c +++ b/src/msnprotocol.c @@ -1234,13 +1234,13 @@ static void msnprotocol_readable() { assert(cstate.rbufsize - cstate.roffset > 0); rlen = read(cstate.socket, cstate.rbuffer + cstate.roffset, cstate.rbufsize - cstate.roffset); - if ( rlen >= 0 ) { + if ( rlen > 0 ) { cstate.roffset += rlen; assert(cstate.roffset <= cstate.rbufsize); /* This would indicate a buffer overrun */ } /* First, check this isn't a disconnection */ - if ( (rlen == 0) || (rlen == -1) ) { + if ( rlen <= 0 ) { int closeval; |