From 0ad80a30e2787966175e7458028e0ef90114e924 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 12 2020 00:55:05 +0000 Subject: Apply patch 0001-Fix-poll_for_response-race-condition.patch patch_name: 0001-Fix-poll_for_response-race-condition.patch present_in_specfile: true --- diff --git a/src/xcb_io.c b/src/xcb_io.c index 6a12d15..2aacbda 100644 --- a/src/xcb_io.c +++ b/src/xcb_io.c @@ -201,12 +201,10 @@ static int handle_error(Display *dpy, xError *err, Bool in_XReply) } /* Widen a 32-bit sequence number into a 64bit (uint64_t) sequence number. - * Treating the comparison as a 1 and shifting it avoids a conditional branch. */ static void widen(uint64_t *wide, unsigned int narrow) { - uint64_t new = (*wide & ~((uint64_t)0xFFFFFFFFUL)) | narrow; - *wide = new + (((uint64_t)(new < *wide)) << 32); + *wide += (int32_t) (narrow - *wide); } /* Thread-safety rules: