diff --git a/common/xscreen.c b/common/xscreen.c index 2c0a4590..647f390a 100644 --- a/common/xscreen.c +++ b/common/xscreen.c @@ -78,16 +78,16 @@ screensinfo_new(xcb_connection_t *conn) int xinerama_screen_number, screen, screen_to_test; xcb_screen_t *s; bool drop; - xcb_xinerama_is_active_reply_t *r = NULL; + xcb_xinerama_is_active_reply_t *xia = NULL; si = p_new(ScreensInfo, 1); /* Check for extension before checking for Xinerama */ if(xcb_get_extension_data(conn, &xcb_xinerama_id)->present) { - r = xcb_xinerama_is_active_reply(conn, xcb_xinerama_is_active(conn), NULL); - si->xinerama_is_active = r->state; - p_delete(&r); + xia = xcb_xinerama_is_active_reply(conn, xcb_xinerama_is_active(conn), NULL); + si->xinerama_is_active = xia->state; + p_delete(&xia); } if(si->xinerama_is_active) diff --git a/common/xutil.c b/common/xutil.c index 52dffe48..32c50781 100644 --- a/common/xutil.c +++ b/common/xutil.c @@ -119,27 +119,28 @@ bool xutil_get_transient_for_hint(xcb_connection_t *c, xcb_window_t win, xcb_window_t *prop_win) { - xcb_get_property_reply_t *r; + xcb_get_property_reply_t *t_hint_r; /* Use checked because the error handler should not take care of * this error as we only return a boolean */ - r = xcb_get_property_reply(c, - xcb_get_property(c, false, win, - WM_TRANSIENT_FOR, - WINDOW, 0, 1), - NULL); + t_hint_r = xcb_get_property_reply(c, + xcb_get_property(c, false, win, + WM_TRANSIENT_FOR, + WINDOW, 0, 1), + NULL); - if(!r || r->type != WINDOW || r->format != 32 || r->length == 0) + if(!t_hint_r || t_hint_r->type != WINDOW || t_hint_r->format != 32 || + t_hint_r->length == 0) { *prop_win = XCB_NONE; - if(r) - p_delete(&r); + if(t_hint_r) + p_delete(&t_hint_r); return false; } - *prop_win = *((xcb_window_t *) xcb_get_property_value(r)); - p_delete(&r); + *prop_win = *((xcb_window_t *) xcb_get_property_value(t_hint_r)); + p_delete(&t_hint_r); return true; } @@ -167,7 +168,7 @@ class_hint_t * xutil_get_class_hint(xcb_connection_t *conn, xcb_window_t win) { xcb_get_property_reply_t *class_hint_r = NULL; - char *data = NULL; + char *data; int len_name, len_class;