Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_bg.c 


Log Message:
Minor formatting fixes. Init some Evas_List vars to null first.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_bg.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- e_bg.c      17 Aug 2007 17:23:06 -0000      1.29
+++ e_bg.c      12 Oct 2007 18:36:48 -0000      1.30
@@ -14,7 +14,7 @@
 EAPI int 
 e_bg_init(void)
 {
-   Evas_List *l;
+   Evas_List *l = NULL;
 
    /* Register files in use */
    if (e_config->desktop_default_background)
@@ -23,7 +23,9 @@
    for (l = e_config->desktop_backgrounds; l; l = l->next)
      {
        E_Config_Desktop_Background *cfbg;
+
        cfbg = l->data;
+       if (!cfbg) continue;
        e_filereg_register(cfbg->file);
      }
    
@@ -34,7 +36,7 @@
 EAPI int 
 e_bg_shutdown(void)
 {
-   Evas_List *l;
+   Evas_List *l = NULL;
 
    /* Register files in use */
    if (e_config->desktop_default_background)
@@ -42,9 +44,11 @@
 
    for (l = e_config->desktop_backgrounds; l; l = l->next)
      {
-       E_Config_Desktop_Background *cfbg;
-       cfbg = l->data;
-       e_filereg_deregister(cfbg->file);
+       E_Config_Desktop_Background *cfbg;
+
+       cfbg = l->data;
+       if (!cfbg) continue;
+       e_filereg_deregister(cfbg->file);
      }
 
    return 1;
@@ -59,7 +63,6 @@
 e_bg_config_get(int container_num, int zone_num, int desk_x, int desk_y)
 {
    Evas_List *l, *ll, *entries;
-
    E_Config_Desktop_Background *bg = NULL;
    int current_spec = 0; /* how specific the setting is - we want the least 
general one that applies */
 
@@ -72,7 +75,7 @@
             int spec;
 
             cfbg = l->data;
-
+            if (!cfbg) continue;
             spec = 0;
             if (cfbg->container == container_num) spec++;
             else if (cfbg->container >= 0) continue;
@@ -133,9 +136,8 @@
             edje_file_collection_list_free(entries);
          }
        if (!ok)
-         {
-            bgfile = e_theme_edje_file_get("base/theme/background", 
"e/desktop/background");
-         }
+         bgfile = e_theme_edje_file_get("base/theme/background", 
+                                        "e/desktop/background");
      }
 
    return bgfile;
@@ -165,8 +167,7 @@
        const char *pfile = "";
        
        edje_object_file_get(zone->bg_object, &pfile, NULL);
-       if (!e_util_strcmp(pfile, bgfile))
-         return;
+       if (!e_util_strcmp(pfile, bgfile)) return;
      }
    
    if (transition == E_BG_TRANSITION_NONE)
@@ -278,7 +279,7 @@
 EAPI void
 e_bg_del(int container, int zone, int desk_x, int desk_y)
 {
-   Evas_List *l;
+   Evas_List *l = NULL;
    E_Event_Bg_Update *ev;
    
    for (l = e_config->desktop_backgrounds; l; l = l->next)
@@ -286,6 +287,7 @@
        E_Config_Desktop_Background *cfbg;
        
        cfbg = l->data;
+       if (!cfbg) continue;
        if ((cfbg->container == container) && (cfbg->zone == zone) &&
            (cfbg->desk_x == desk_x) && (cfbg->desk_y == desk_y))
          {
@@ -336,7 +338,6 @@
    E_Zone *zone;
    
    zone = data;
-
    if (zone->prev_bg_object)
      {
        evas_object_del(zone->prev_bg_object);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to