Make xcb_disconnect(NULL) safe
authorUli Schlachter <psychon@znc.in>
Tue, 31 Dec 2013 14:18:01 +0000 (15:18 +0100)
committerUli Schlachter <psychon@znc.in>
Fri, 21 Mar 2014 13:39:44 +0000 (14:39 +0100)
commit2fb14e5883f2ea2f01d248674cfcc26ccb704753
tree853269c6c96fefe3648cdc2e9feee9e83c01ac61
parent4dcbfd77b78ca6b016ce815af26235501f6cd75a
Make xcb_disconnect(NULL) safe

Code can be simplified if the deallocation functions can always be called in
cleanup code. So if you have some code that does several things that can go
wrong, one of which is xcb_connect(), after this change, the xcb_connection_t*
variable can be initialized to NULL and xcb_disconnect() can always be called on
the connection object.

References: http://lists.freedesktop.org/archives/xcb/2013-September/008659.html

Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Julien Cristau <jcristau@debian.org>
src/xcb.h
src/xcb_conn.c