ok use calloc - but.. i think llvm is wrong for:
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 2 Mar 2010 02:10:48 +0000 (02:10 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 2 Mar 2010 02:10:48 +0000 (02:10 +0000)
http://people.profusion.mobi/~lfelipe/static_analysis/efl/efl-46715/evas/2010-03-01-1/report-wLmp95.html#EndPath

i can't see how that can be garbage.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@46764 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_draw_main.c

index 581e397..7fe510c 100644 (file)
@@ -11,11 +11,7 @@ evas_common_draw_context_cutouts_new(void)
 {
    Cutout_Rects *rects;
 
-   rects = malloc(sizeof(Cutout_Rects));
-   rects->rects = NULL;
-   rects->active = 0;
-   rects->max = 0;
-
+   rects = calloc(1, sizeof(Cutout_Rects));
    return rects;
 }