test: Initialize structure on declarations with { 0 }.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 2 Feb 2014 14:14:23 +0000 (23:14 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Sun, 2 Feb 2014 14:14:23 +0000 (23:14 +0900)
No need to call memset manually.

src/bin/test_flip_page.c
src/bin/test_focus3.c

index 555ddd4..5e0201c 100644 (file)
@@ -514,9 +514,7 @@ _state_update(State *st)
 
         for (row = 0, gy = 0; gy < h; gy += gszh, row++)
           {
-             Vertex3 vo[4];
-
-             memset(vo, 0, sizeof (vo));
+             Vertex3 vo[4] = { 0 };
 
              if (b > 0) nn = num + st->slices_h - row - 1;
              else nn = num + row;
index 9edb1c7..207327f 100644 (file)
@@ -364,9 +364,8 @@ void
 test_focus_custom(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
 {
    Evas_Object *win, *fr, *bx, *bx2, *bt, *spinner, *sp, *chk;
-   char win_focus_theme[PATH_MAX];
+   char win_focus_theme[PATH_MAX] = { 0 };
 
-   memset(win_focus_theme, 0, sizeof(win_focus_theme));
    sprintf(win_focus_theme, "%s/objects/test_focus_custom.edj", elm_app_data_dir_get());
 
    elm_theme_overlay_add(NULL, win_focus_theme);