From 6149c7a6b57a193bc132fbc35b1772b75e5c7ca7 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Thu, 23 Feb 2006 12:15:09 -0800 Subject: More return value changes, and make _xcb_in_read_packet static since it is not called from outside xcb_in.c. --- src/xcb_out.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/xcb_out.c') diff --git a/src/xcb_out.c b/src/xcb_out.c index 2487139..62d7053 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -199,8 +199,9 @@ int _xcb_out_write(XCBConnection *c) else n = _xcb_write(c->fd, &c->out.queue, &c->out.queue_len); - if(n < 0 && errno == EAGAIN) - n = 1; + /* XXX: should "nothing was written" be considered failure or + * success for this function? it's not an I/O error, but... */ + n = (n > 0) || (n < 0 && errno == EAGAIN); if(c->out.vec_len) { -- cgit v1.2.3