Simpify client_post_select()
authorAndre <maan@p133.(none)>
Sat, 8 Jul 2006 02:17:09 +0000 (04:17 +0200)
committerAndre <maan@p133.(none)>
Sat, 8 Jul 2006 02:17:09 +0000 (04:17 +0200)
send_bin_buffer() can only return zero if passed a zero length arg
which is impossible at this point.

client_common.c

index b77c192..c738079 100644 (file)
@@ -278,11 +278,8 @@ void client_post_select(struct sched *s, struct task *t)
        case CL_SENDING: /* FIXME: might block */
                PARA_INFO_LOG("loaded: %zd\n", *pcd->in_loaded);
                t->ret = send_bin_buffer(pcd->fd, pcd->inbuf, *pcd->in_loaded);
-               if (t->ret <= 0) {
-                       if (!t->ret)
-                               t->ret = 1;
+               if (t->ret < 0)
                        return;
-               }
                *pcd->in_loaded = 0; /* FIXME: short writes */
                return;
        case CL_RECEIVING: