From a541477e94681901c3313ea0b067f4ef7d9fbbcb Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine Date: Sun, 30 Mar 2008 14:47:26 +0100 Subject: [PATCH] Cosmetic --- common/xscreen.c | 8 ++++---- common/xutil.c | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/common/xscreen.c b/common/xscreen.c index 2c0a4590f..647f390ac 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 52dffe485..32c507811 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;