summaryrefslogtreecommitdiff
path: root/src/modules/conf_display
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-11 16:33:42 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-11 16:45:30 +0100
commit82116f63ab76c25325264c03798766b347417110 (patch)
tree3f84de23fb9e86e927b8b737dd64c4b09acdf43d /src/modules/conf_display
parent413463d2cd39209e141ba1e3fc6c42f7aa4beb2b (diff)
downloadenlightenment-82116f63ab76c25325264c03798766b347417110.tar.gz
remove str(n)dupa usages
str(n)dupa are GNU extensions that duplicate a string, using an alloca'd buffer. This patch removes their definitions from e.h (which should only contain E's own API, without fallback definitions for libc functions) which were wrong anyway (they failed in cases where str(n)dupa was an actual function, not a macro). Instead, we replace them depending on context with alloca+memcpy+strlen or a static buffer (used in contexts where we are sure that the buffer will contain the string entirely) @fix
Diffstat (limited to 'src/modules/conf_display')
-rw-r--r--src/modules/conf_display/e_int_config_desks.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/conf_display/e_int_config_desks.c b/src/modules/conf_display/e_int_config_desks.c
index 2b54c6be38..3d508a5c54 100644
--- a/src/modules/conf_display/e_int_config_desks.c
+++ b/src/modules/conf_display/e_int_config_desks.c
@@ -227,10 +227,11 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
{
char *p;
const char *pp;
+ char buf[PATH_MAX];
pp = strchr(s, '/');
pp = pp ? pp + 1 : s;
- p = strdupa(pp);
+ p = memcpy(buf, pp, strlen(pp) + 1);
p[0] = toupper(p[0]);
ob = e_widget_radio_add(evas, _(p), mode, rg);
e_widget_list_object_append(o, ob, 1, 0, 0.5);