From 6f409e39d0b3470eca2478b96f23b80e74c283c2 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 30 Apr 2008 11:57:16 +0200 Subject: [PATCH] [rules] Cosmetic Signed-off-by: Julien Danjou --- rules.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rules.c b/rules.c index 45c9b5476..84d941572 100644 --- a/rules.c +++ b/rules.c @@ -65,10 +65,10 @@ rule_matching_client(client_t *c) if(!(ch = xutil_get_class_hint(globalconf.connection, c->win))) return NULL; - len = a_strlen(ch->res_class) + a_strlen(ch->res_name) + a_strlen(c->name); - prop = p_new(char, len + 3); + len = a_strlen(ch->res_class) + a_strlen(ch->res_name) + a_strlen(c->name) + 3; + prop = p_new(char, len); - snprintf(prop, len + 3, "%s:%s:%s", + snprintf(prop, len, "%s:%s:%s", ch->res_class ? ch->res_class : "", ch->res_name ? ch->res_name : "", c->name); if(ch->res_class)