elm_widget: @fix use of uninitialized values.
authorGustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
Thu, 6 Mar 2014 14:04:41 +0000 (11:04 -0300)
committerGustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
Thu, 6 Mar 2014 14:08:48 +0000 (11:08 -0300)
Valgrind reports n and weight could be read before they were written to.

src/lib/elm_widget.c

index 8a2a70b..b3bfb63 100644 (file)
@@ -2934,9 +2934,9 @@ _elm_widget_focus_list_next_get(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
                }
              else
                {
-                  Evas_Object *n;
+                  Evas_Object *n = NULL;
                   double degree;
-                  double weight;
+                  double weight = 0.0;
 
                   if (dir == ELM_FOCUS_UP) degree = 0.0;
                   else if (dir == ELM_FOCUS_DOWN) degree = 180.0;