summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2012-11-09 21:22:04 +0000
committerVincent Torri <vincent.torri@gmail.com>2012-11-09 21:22:04 +0000
commitf45f7ab5b1acef72400db9ab83e9034098a9dd1a (patch)
tree0a0a5b68a7704add8027a4f914d8c4461d8f7fc1
parent16b43845299c73459e693502ca805316574bb92b (diff)
Evas: fix memset bug and no need to check returned value of alloca
SVN revision: 79064
-rw-r--r--src/lib/evas/canvas/evas_object_box.c16
1 files 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)
1415 1415
1416 /* *per row* arrays */ 1416 /* *per row* arrays */
1417 row_max_h = (int *)alloca(sizeof(int) * n_children); 1417 row_max_h = (int *)alloca(sizeof(int) * n_children);
1418 if (!row_max_h)
1419 return;
1420 row_break = (int *)alloca(sizeof(int) * n_children); 1418 row_break = (int *)alloca(sizeof(int) * n_children);
1421 if (!row_break)
1422 return;
1423 row_width = (int *)alloca(sizeof(int) * n_children); 1419 row_width = (int *)alloca(sizeof(int) * n_children);
1424 if (!row_width)
1425 return;
1426 1420
1427 memset(row_width, 0, sizeof(row_width)); 1421 memset(row_width, 0, sizeof(int) * n_children);
1428 1422
1429 evas_object_geometry_get(o, &x, &y, &w, &h); 1423 evas_object_geometry_get(o, &x, &y, &w, &h);
1430 1424
@@ -1603,16 +1597,10 @@ _box_layout_flow_vertical(Eo *o, void *_pd, va_list *list EINA_UNUSED)
1603 1597
1604 /* *per col* arrays */ 1598 /* *per col* arrays */
1605 col_max_w = (int *)alloca(sizeof(int) * n_children); 1599 col_max_w = (int *)alloca(sizeof(int) * n_children);
1606 if (!col_max_w)
1607 return;
1608 col_break = (int *)alloca(sizeof(int) * n_children); 1600 col_break = (int *)alloca(sizeof(int) * n_children);
1609 if (!col_break)
1610 return;
1611 col_height = (int *)alloca(sizeof(int) * n_children); 1601 col_height = (int *)alloca(sizeof(int) * n_children);
1612 if (!col_height)
1613 return;
1614 1602
1615 memset(col_height, 0, sizeof(col_height)); 1603 memset(col_height, 0, sizeof(int) * n_children);
1616 1604
1617 evas_object_geometry_get(o, &x, &y, &w, &h); 1605 evas_object_geometry_get(o, &x, &y, &w, &h);
1618 1606