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:
Lucas De Marchi 2010-08-13 12:53:08 +00:00
parent 396de7df7c
commit e010e6f1bd
1 changed files with 1 additions and 2 deletions

View File

@ -341,8 +341,7 @@ _il_home_desktop_find_border(E_Zone *zone, Efreet_Desktop *desktop)
else
{
size_t s = p - desktop->exec + 1;
exe = malloc(s);
memset(exe, 0, s);
exe = calloc(1, s);
if (exe) eina_strlcpy(exe, desktop->exec, s);
}
if (exe)