From f45f7ab5b1acef72400db9ab83e9034098a9dd1a Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 9 Nov 2012 21:22:04 +0000 Subject: [PATCH] Evas: fix memset bug and no need to check returned value of alloca SVN revision: 79064 --- src/lib/evas/canvas/evas_object_box.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c index 2cc4597a61..e8c694f271 100644 --- a/src/lib/evas/canvas/evas_object_box.c +++ b/src/lib/evas/canvas/evas_object_box.c @@ -1415,16 +1415,10 @@ _box_layout_flow_horizontal(Eo *o, void *_pd, va_list *list EINA_UNUSED) /* *per row* arrays */ row_max_h = (int *)alloca(sizeof(int) * n_children); - if (!row_max_h) - return; row_break = (int *)alloca(sizeof(int) * n_children); - if (!row_break) - return; row_width = (int *)alloca(sizeof(int) * n_children); - if (!row_width) - return; - memset(row_width, 0, sizeof(row_width)); + memset(row_width, 0, sizeof(int) * n_children); evas_object_geometry_get(o, &x, &y, &w, &h); @@ -1603,16 +1597,10 @@ _box_layout_flow_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED) /* *per col* arrays */ col_max_w = (int *)alloca(sizeof(int) * n_children); - if (!col_max_w) - return; col_break = (int *)alloca(sizeof(int) * n_children); - if (!col_break) - return; col_height = (int *)alloca(sizeof(int) * n_children); - if (!col_height) - return; - memset(col_height, 0, sizeof(col_height)); + memset(col_height, 0, sizeof(int) * n_children); evas_object_geometry_get(o, &x, &y, &w, &h);