use alloca+memcpy instead of strdupa.
for these guys that insist in using doomed systems like solaris or bsd, god save them ;-) Patch by vtorri. SVN revision: 40491
This commit is contained in:
parent
96511aeea4
commit
e09dc2a71c
|
@ -822,14 +822,20 @@ _edje_emit(Edje *ed, const char *sig, const char *src)
|
|||
sep = strchr(sig, ':');
|
||||
if (sep)
|
||||
{
|
||||
size_t length;
|
||||
char *part;
|
||||
/* the signal contains a colon, split the signal into "group:signal",
|
||||
* and deliver it to "group"
|
||||
*/
|
||||
char *part = strdupa(sig);
|
||||
length = strlen(sig) + 1;
|
||||
part = alloca(length);
|
||||
if (part)
|
||||
{
|
||||
char *newsig = part + (sep - sig);
|
||||
char *newsig;
|
||||
int i;
|
||||
|
||||
memcpy(part, sig, length);
|
||||
newsig = part + (sep - sig);
|
||||
*newsig = '\0';
|
||||
newsig++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue