]> jfr.im git - solanum.git/commitdiff
Clean this up a bit.
authorJilles Tjoelker <redacted>
Thu, 3 Apr 2008 20:11:19 +0000 (22:11 +0200)
committerJilles Tjoelker <redacted>
Thu, 3 Apr 2008 20:11:19 +0000 (22:11 +0200)
src/packet.c

index 304dfe586ff7f012cdbe81c442f596425a4965a6..9d8207b1bf6817828066ea70a78e6683f4ac5313 100644 (file)
@@ -252,17 +252,16 @@ read_packet(rb_fde_t * F, void *data)
                 */
                length = rb_read(client_p->localClient->F, readBuf, READBUF_SIZE);
 
-               if(length <= 0)
+               if(length < 0)
                {
-                       if(length < 0 && rb_ignore_errno(errno))
-                       {
+                       if(rb_ignore_errno(errno))
                                rb_setselect(client_p->localClient->F, 
                                                RB_SELECT_READ, read_packet, client_p);
-                       else
+                       else
                                error_exit_client(client_p, length);
                        return;
                }
-               if(length == 0)
+               else if(length == 0)
                {
                        error_exit_client(client_p, length);
                        return;