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)
|
EINA_LIST_FOREACH(code_lookups, l, cl)
|
||||||
{
|
{
|
||||||
char buf[256];
|
char buf[12];
|
||||||
int i, n;
|
int n;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%i", cl->val);
|
n = eina_convert_itoa(cl->val, buf);
|
||||||
n = strlen(buf);
|
|
||||||
if (n > cl->len)
|
if (n > cl->len)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s: Error. The unexpected happened. A numeric replacement string was larger than the original!\n",
|
fprintf(stderr, "%s: Error. The unexpected happened. A numeric replacement string was larger than the original!\n",
|
||||||
progname);
|
progname);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
for (i = 0; i < cl->len; i++) cl->ptr[i] = ' ';
|
memset(cl->ptr, ' ', cl->len);
|
||||||
strncpy(cl->ptr, buf, n);
|
strncpy(cl->ptr, buf, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue