forked from enlightenment/enlightenment
Apply memset-calloc.cocci
Change calls to malloc + memset to calloc whenever an automatic conversion can be done. Possible candidates are not treated here, only the ones we can be sure the conversion is safe. SVN revision: 51078
This commit is contained in:
parent
396de7df7c
commit
e010e6f1bd
|
@ -341,8 +341,7 @@ _il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
size_t s = p - desktop->exec + 1;
|
size_t s = p - desktop->exec + 1;
|
||||||
exe = malloc(s);
|
exe = calloc(1, s);
|
||||||
memset(exe, 0, s);
|
|
||||||
if (exe) eina_strlcpy(exe, desktop->exec, s);
|
if (exe) eina_strlcpy(exe, desktop->exec, s);
|
||||||
}
|
}
|
||||||
if (exe)
|
if (exe)
|
||||||
|
|
Loading…
Reference in New Issue