]> spindle.queued.net Git - midori/commitdiff
Always initialize variables in speeddial_new_from_file
authorChristian Dywan <christian@twotoasts.de>
Tue, 22 Mar 2011 21:50:08 +0000 (22:50 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 22 Mar 2011 22:02:00 +0000 (23:02 +0100)
midori/main.c

index 7d1687464caf724d6529ac628faca137f56ec7dd..32fc74e1d8a139b517b43af88a16a31e96a8c067 100644 (file)
@@ -1494,8 +1494,8 @@ speeddial_new_from_file (const gchar* config,
     {
         gchar* key;
         gchar* val;
-        gchar* slot;
-        gchar* dial_id;
+        gchar* slot = NULL;
+        gchar* dial_id = NULL;
         gchar* uri;
         gchar** values = g_strsplit (parts[i], "\"", -1);
 
@@ -1568,10 +1568,10 @@ speeddial_new_from_file (const gchar* config,
                 thumb_size = atoi (g_strndup (val + 1, strlen (val) - 3));
                 if (thumb_size == 80)
                     thumb_size_type = g_strdup ("SMALL");
-                else if (thumb_size == 160)
-                    thumb_size_type = g_strdup ("MEDIUM");
                 else if (thumb_size == 240)
                     thumb_size_type = g_strdup ("BIG");
+                else /* if (thumb_size == 160) */
+                    thumb_size_type = g_strdup ("MEDIUM");
                 g_key_file_set_value (key_file, "settings", "size", thumb_size_type);
 
                 g_free (thumb_size_type);