From b6cbe837748df5819d00682330d34e2c7d24d349 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sat, 25 Feb 2006 23:26:55 -0800 Subject: [PATCH] Rearrange an if statement that's been bothering me. --- src/xcb_out.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/xcb_out.c b/src/xcb_out.c index 145bddd..fd0a27f 100644 --- a/src/xcb_out.c +++ b/src/xcb_out.c @@ -117,17 +117,14 @@ int XCBSendRequest(XCBConnection *c, unsigned int *request, struct iovec *vector for(i = 0; i < req->count; ++i) longlen += (vector[i].iov_len + 3) >> 2; - if(longlen > c->setup->maximum_request_length) - { - if(longlen > XCBGetMaximumRequestLength(c)) - return 0; /* server can't take this; maybe need BIGREQUESTS? */ - } - else + if(longlen <= c->setup->maximum_request_length) { /* we don't need BIGREQUESTS. */ shortlen = longlen; longlen = 0; } + else if(longlen > XCBGetMaximumRequestLength(c)) + return 0; /* server can't take this; maybe need BIGREQUESTS? */ padded = #ifdef HAVE_ALLOCA -- 2.7.4