summaryrefslogtreecommitdiff
path: root/dist/xcb-util/icccm
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-07-20 20:55:11 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-07-20 20:55:11 +0000
commit561c135c3cb5eb06d44a32823cff8a32f8833d19 (patch)
treee09bc438db825ec38bcd58a54fda409f973cb001 /dist/xcb-util/icccm
parent279846ff58069c2ac686a94c08951577483b315c (diff)
gcc 2.95 build fixes.
Diffstat (limited to 'dist/xcb-util/icccm')
-rw-r--r--dist/xcb-util/icccm/icccm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/dist/xcb-util/icccm/icccm.c b/dist/xcb-util/icccm/icccm.c
index 1c3de0d87..454e1ab35 100644
--- a/dist/xcb-util/icccm/icccm.c
+++ b/dist/xcb-util/icccm/icccm.c
@@ -241,13 +241,15 @@ uint8_t
xcb_get_wm_class_from_reply(xcb_get_wm_class_reply_t *prop,
xcb_get_property_reply_t *reply)
{
+ int name_len;
+
if(!reply || reply->type != STRING || reply->format != 8)
return 0;
prop->_reply = reply;
prop->instance_name = (char *) xcb_get_property_value(prop->_reply);
- int name_len = strlen(prop->instance_name);
+ name_len = strlen(prop->instance_name);
if(name_len == xcb_get_property_value_length(prop->_reply))
name_len--;
@@ -430,11 +432,12 @@ uint8_t
xcb_get_wm_size_hints_from_reply(xcb_size_hints_t *hints, xcb_get_property_reply_t *reply)
{
uint32_t flags;
+ int length;
if(!reply)
return 0;
- int length = xcb_get_property_value_length(reply) / (reply->format / 8);
+ length = xcb_get_property_value_length(reply) / (reply->format / 8);
if (!(reply->type == WM_SIZE_HINTS &&
(reply->format == 8 || reply->format == 16 ||
@@ -623,11 +626,13 @@ uint8_t
xcb_get_wm_hints_from_reply(xcb_wm_hints_t *hints,
xcb_get_property_reply_t *reply)
{
+ int length, num_elem;
+
if(!reply)
return 0;
- int length = xcb_get_property_value_length(reply);
- int num_elem = length / (reply->format / 8);
+ length = xcb_get_property_value_length(reply);
+ num_elem = length / (reply->format / 8);
if (reply->type != WM_HINTS
|| reply->format != 32