in libxcb-1.5/src/xcb_in.c: read_block() should read: (replace the new ELSE by else) ... if(ret > 0) done += ret; ELSE if(ret < 0 && errno == EAGAIN) { ... } ELSE if(ret <= 0) return ret; ... This saves 2 if() on partial read.
I agree for the first else, but the second seems like a bad idea: poll or select might return 0.
Inspection of the assembly code convinces me that the compiler does the right thing here, as I expected. So there's no performance issue. The style of the existing code isn't so bad, I think. I tried some restructurings, and couldn't find one so much better that it was worth a patch. So for now I think we'll leave the elses off.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.