X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb_in.c;h=3bf54f3b8f27c40a0a38a2335b5902ebd94e7a5a;hb=2a18842f0f93516ff726a2dfa44348410bb55626;hp=db9d1ca4d428b2503b60aa64ba1a0b229d9a4053;hpb=f090da98f367ed869fd9277d2fef22555be0f91d;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb_in.c b/src/xcb_in.c index db9d1ca..3bf54f3 100644 --- a/src/xcb_in.c +++ b/src/xcb_in.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "xcb.h" @@ -442,18 +443,16 @@ void _xcb_in_destroy(_xcb_in *in) int _xcb_in_expect_reply(XCBConnection *c, unsigned int request, enum workarounds workaround, int flags) { - if(workaround != WORKAROUND_NONE || flags != 0) - { - pending_reply *pend = malloc(sizeof(pending_reply)); - if(!pend) - return 0; - pend->request = request; - pend->workaround = workaround; - pend->flags = flags; - pend->next = 0; - *c->in.pending_replies_tail = pend; - c->in.pending_replies_tail = &pend->next; - } + pending_reply *pend = malloc(sizeof(pending_reply)); + assert(workaround != WORKAROUND_NONE || flags != 0); + if(!pend) + return 0; + pend->request = request; + pend->workaround = workaround; + pend->flags = flags; + pend->next = 0; + *c->in.pending_replies_tail = pend; + c->in.pending_replies_tail = &pend->next; return 1; }