dccp_send.c: Simplify send_queued_chunks().
authorAndre Noll <maan@systemlinux.org>
Sun, 12 Aug 2007 21:36:51 +0000 (23:36 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 12 Aug 2007 21:36:51 +0000 (23:36 +0200)
The dccp socket is non-blocking, so there's no need to
check for writability.

dccp_send.c

index 2c8f800..b5373e0 100644 (file)
@@ -163,9 +163,7 @@ static int send_queued_chunks(struct dccp_client *dc)
        while ((qc = cq_peek(dc->cq))) {
                char *buf;
                size_t len;
-               int ret = write_ok(dc->fd);
-               if (ret <= 0)
-                       return ret? -E_WRITE_OK : 0;
+               int ret;
                cq_get(qc, &buf, &len);
                ret = dccp_write(dc->fd, buf, len);
                if (ret < 0)