StrConcatDot used in rootmenu.c to simplify code.
---
 src/rootmenu.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/rootmenu.c b/src/rootmenu.c
index b2b28ce..a76c0d8 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -299,16 +299,13 @@ static void legalPanelCommand(WMenu * menu, WMenuEntry * 
entry)
 static char * getLocalizedMenuFile(char *menu)
 {
        char *buffer, *ptr, *locale;
-       int len;
 
        if (!Locale)
                return NULL;
 
-       len = strlen(menu) + strlen(Locale) + 8;
-       buffer = wmalloc(len);
+       buffer = StrConcatDot(menu, Locale, True);
 
        /* try menu.locale_name */
-       snprintf(buffer, len, "%s.%s", menu, Locale);
        if (access(buffer, F_OK) == 0)
                return buffer;
 
-- 
1.7.9.1

>From af75056b76599e915b010618535925be3217a3b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Sat, 14 Apr 2012 13:24:55 +0200
Subject: [PATCH 13/16] WindowMaker: StrConcatDot used in rootmenu.c

StrConcatDot used in rootmenu.c to simplify code.
---
 src/rootmenu.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/rootmenu.c b/src/rootmenu.c
index b2b28ce..a76c0d8 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -299,16 +299,13 @@ static void legalPanelCommand(WMenu * menu, WMenuEntry * entry)
 static char * getLocalizedMenuFile(char *menu)
 {
 	char *buffer, *ptr, *locale;
-	int len;
 
 	if (!Locale)
 		return NULL;
 
-	len = strlen(menu) + strlen(Locale) + 8;
-	buffer = wmalloc(len);
+	buffer = StrConcatDot(menu, Locale, True);
 
 	/* try menu.locale_name */
-	snprintf(buffer, len, "%s.%s", menu, Locale);
 	if (access(buffer, F_OK) == 0)
 		return buffer;
 
-- 
1.7.9.1

Reply via email to