projects
/
free-sw
/
xcb
/
libxcb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Delete a useless level of indirection from _xcb_out_send's parameters.
[free-sw/xcb/libxcb]
/
src
/
xcb_conn.c
diff --git
a/src/xcb_conn.c
b/src/xcb_conn.c
index
ed2153d
..
50a662b
100644
(file)
--- a/
src/xcb_conn.c
+++ b/
src/xcb_conn.c
@@
-102,10
+102,7
@@
static int write_setup(xcb_connection_t *c, xcb_auth_info_t *auth_info)
assert(count <= (int) (sizeof(parts) / sizeof(*parts)));
pthread_mutex_lock(&c->iolock);
assert(count <= (int) (sizeof(parts) / sizeof(*parts)));
pthread_mutex_lock(&c->iolock);
- {
- struct iovec *parts_ptr = parts;
- ret = _xcb_out_send(c, &parts_ptr, &count);
- }
+ ret = _xcb_out_send(c, parts, count);
pthread_mutex_unlock(&c->iolock);
return ret;
}
pthread_mutex_unlock(&c->iolock);
return ret;
}
@@
-210,6
+207,14
@@
xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info)
{
xcb_connection_t* c;
{
xcb_connection_t* c;
+#ifndef USE_POLL
+ if(fd >= FD_SETSIZE) /* would overflow in FD_SET */
+ {
+ close(fd);
+ return (xcb_connection_t *) &error_connection;
+ }
+#endif
+
c = calloc(1, sizeof(xcb_connection_t));
if(!c) {
close(fd);
c = calloc(1, sizeof(xcb_connection_t));
if(!c) {
close(fd);