From 7f022f1c8f2e8f905f28bdceea54277ad551f242 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 6 Jun 2012 12:25:58 +0200 Subject: [PATCH] Remove code duplication by calling get_name_for_instance_class() The code in application.c to create the icon name is included in icon.c (function get_name_for_instance_class). --- src/application.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/application.c b/src/application.c index c50f3e40..ca472031 100644 --- a/src/application.c +++ b/src/application.c @@ -114,25 +114,8 @@ void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char *wm_cla WMPropList *adict, *key, *iconk; WMPropList *val; char *tmp; - int i; - - i = 0; - if (wm_instance) - i += strlen(wm_instance); - if (wm_class) - i += strlen(wm_class); - - tmp = wmalloc(i + 8); - *tmp = 0; - if (wm_class && wm_instance) { - sprintf(tmp, "%s.%s", wm_instance, wm_class); - } else { - if (wm_instance) - strcat(tmp, wm_instance); - if (wm_class) - strcat(tmp, wm_class); - } + tmp = get_name_for_instance_class(wm_instance, wm_class); key = WMCreatePLString(tmp); wfree(tmp); -- 2.11.4.GIT