From: antognolli Date: Fri, 28 Oct 2011 17:18:38 +0000 (+0000) Subject: ecore/fb: Remove useless strdup(). X-Git-Tag: 2.0_alpha~139^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1290dc1b98b5ba84126a92f3072fe5c35630ddc;p=framework%2Fuifw%2Fecore.git ecore/fb: Remove useless strdup(). It wasn't even being freed. Patch for SiT. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@64499 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c index 570d004..b203e6b 100644 --- a/src/lib/ecore_fb/ecore_fb_li.c +++ b/src/lib/ecore_fb/ecore_fb_li.c @@ -44,7 +44,7 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE)) { int offset = 0; - char *keyname = strdup(_ecore_fb_li_kbd_syms[iev->code * 6]); + const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 6]; /* check the key table */ if (iev->value) { @@ -96,8 +96,8 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie if (dev->keyboard.shift) offset = 1; else if (dev->keyboard.lock) offset = 2; - char *key = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + offset]); - char *compose = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]); + const char *key = _ecore_fb_li_kbd_syms[(iev->code * 6) + offset]; + const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]; e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) + (compose ? strlen(compose) : 0) + 3);