forked from enlightenment/efl
* edje: Remove snprintf("%i") for an eina itoa.
NOTE: When you just want to convert from an int to a string, better use eina for that. SVN revision: 39213
This commit is contained in:
parent
0b41f0e138
commit
6ab6dbca0d
|
@ -1354,18 +1354,17 @@ data_process_script_lookups(void)
|
|||
|
||||
EINA_LIST_FOREACH(code_lookups, l, cl)
|
||||
{
|
||||
char buf[256];
|
||||
int i, n;
|
||||
char buf[12];
|
||||
int n;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%i", cl->val);
|
||||
n = strlen(buf);
|
||||
n = eina_convert_itoa(cl->val, buf);
|
||||
if (n > cl->len)
|
||||
{
|
||||
fprintf(stderr, "%s: Error. The unexpected happened. A numeric replacement string was larger than the original!\n",
|
||||
progname);
|
||||
exit(-1);
|
||||
}
|
||||
for (i = 0; i < cl->len; i++) cl->ptr[i] = ' ';
|
||||
memset(cl->ptr, ' ', cl->len);
|
||||
strncpy(cl->ptr, buf, n);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue