Minor code optimization / pretification

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2009-04-13 14:17:03 +02:00 committed by Julien Danjou
parent 7b2627cbf9
commit 7b91cf259c
1 changed files with 1 additions and 5 deletions

View File

@ -137,10 +137,7 @@ window_opacity_get(xcb_window_t win)
prop_r = xcb_get_property_reply(globalconf.connection, prop_c, NULL); prop_r = xcb_get_property_reply(globalconf.connection, prop_c, NULL);
if(!prop_r || !prop_r->value_len || prop_r->format != 32) if(prop_r && prop_r->value_len && prop_r->format == 32)
goto bailout;
if(prop_r->value_len)
{ {
unsigned int *data = xcb_get_property_value(prop_r); unsigned int *data = xcb_get_property_value(prop_r);
unsigned int value = *data; unsigned int value = *data;
@ -148,7 +145,6 @@ window_opacity_get(xcb_window_t win)
return (double) value / (double) 0xffffffff; return (double) value / (double) 0xffffffff;
} }
bailout:
p_delete(&prop_r); p_delete(&prop_r);
return -1; return -1;
} }