From 55d88deacdb93185b326b2fe968e6f11d26af46d Mon Sep 17 00:00:00 2001 From: Andre Date: Sat, 8 Jul 2006 04:17:09 +0200 Subject: [PATCH] Simpify client_post_select() send_bin_buffer() can only return zero if passed a zero length arg which is impossible at this point. --- client_common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client_common.c b/client_common.c index b77c192f..c738079b 100644 --- a/client_common.c +++ b/client_common.c @@ -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: -- 2.39.2