[Xcb] [PATCH 1/2] Make some functions also work on error connections

Peter Harris pharris at opentext.com
Mon Aug 18 14:55:30 PDT 2014


On 2014-08-18 04:38, Uli Schlachter wrote:
> There is no technical reason why xcb_get_setup() and xcb_get_file_descriptor()
> shouldn't work on non-static error connections. They cannot be used for many
> useful things, but at least they work.
> 
> This works around bugs in lots of programs out there which assume that
> xcb_get_setup() does not return NULL and which just happily dereference the
> results. Since xcb_connect() never returns NULL, it's a bit weird that
> xcb_get_setup() can do so.

I agree. There's no reason for xcb_get_setup to return NULL just because
there has been a socket error at some point.

Reviewed-by: Peter Harris <pharris at opentext.com>

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list