projects
/
free-sw
/
xcb
/
libxcb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make some functions also work on error connections
[free-sw/xcb/libxcb]
/
src
/
xcb_conn.c
diff --git
a/src/xcb_conn.c
b/src/xcb_conn.c
index
ab901a9
..
15f707a
100644
(file)
--- a/
src/xcb_conn.c
+++ b/
src/xcb_conn.c
@@
-288,7
+288,7
@@
static int write_vec(xcb_connection_t *c, struct iovec **vector, int *count)
const xcb_setup_t *xcb_get_setup(xcb_connection_t *c)
{
const xcb_setup_t *xcb_get_setup(xcb_connection_t *c)
{
- if(
c->has_error
)
+ if(
is_static_error_conn(c)
)
return 0;
/* doesn't need locking because it's never written to. */
return c->setup;
return 0;
/* doesn't need locking because it's never written to. */
return c->setup;
@@
-296,7
+296,7
@@
const xcb_setup_t *xcb_get_setup(xcb_connection_t *c)
int xcb_get_file_descriptor(xcb_connection_t *c)
{
int xcb_get_file_descriptor(xcb_connection_t *c)
{
- if(
c->has_error
)
+ if(
is_static_error_conn(c)
)
return -1;
/* doesn't need locking because it's never written to. */
return c->fd;
return -1;
/* doesn't need locking because it's never written to. */
return c->fd;
@@
-350,7
+350,7
@@
xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info)
void xcb_disconnect(xcb_connection_t *c)
{
void xcb_disconnect(xcb_connection_t *c)
{
- if(is_static_error_conn(c))
+ if(
c == NULL ||
is_static_error_conn(c))
return;
free(c->setup);
return;
free(c->setup);