Enlightenment CVS committal

Author  : sebastid
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/ibar


Modified Files:
        e_mod_config.c e_mod_main.c 


Log Message:
Don't strdup homedir

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_config.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- e_mod_config.c      3 Sep 2006 07:40:44 -0000       1.30
+++ e_mod_config.c      22 Sep 2006 19:55:11 -0000      1.31
@@ -226,7 +226,8 @@
 _load_tlist(E_Config_Dialog_Data *cfdata) 
 {
    Ecore_List *dirs;
-   char *home, buf[4096], *file;
+   const char *home;
+   char buf[4096], *file;
    int selnum = -1;
 
    e_widget_tlist_clear(cfdata->tlist);
@@ -254,7 +255,6 @@
          }
        ecore_list_destroy(dirs);
      }
-   free(home);
    e_widget_tlist_go(cfdata->tlist);
    if (selnum >= 0)
      e_widget_tlist_selected_set(cfdata->tlist, selnum);   
===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/ibar/e_mod_main.c,v
retrieving revision 1.146
retrieving revision 1.147
diff -u -3 -r1.146 -r1.147
--- e_mod_main.c        18 Sep 2006 03:49:45 -0000      1.146
+++ e_mod_main.c        22 Sep 2006 19:55:11 -0000      1.147
@@ -145,7 +145,7 @@
    
    evas_object_geometry_get(o, &x, &y, &w, &h);
    inst->drop_handler =
-     e_drop_handler_add(inst->gcc->gadcon, inst,
+     e_drop_handler_add(E_OBJECT(inst->gcc->gadcon), inst,
                        _ibar_inst_cb_enter, _ibar_inst_cb_move,
                        _ibar_inst_cb_leave, _ibar_inst_cb_drop,
                        drop, 3, x, y, w,  h);
@@ -242,14 +242,10 @@
    e_box_align_set(b->o_box, 0.5, 0.5);
    if (dir[0] != '/')
      {
-       char *homedir;
+       const char *homedir;
 
        homedir = e_user_homedir_get();
-       if (homedir)
-         {
-            snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", homedir, 
dir);
-            free(homedir);
-         }
+       snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", homedir, dir);
      }
    else
      snprintf(buf, sizeof(buf), dir);
@@ -468,14 +464,10 @@
               e_object_unref(E_OBJECT(inst->ibar->apps));
             if (inst->dir[0] != '/')
               {
-                 char *homedir;
+                 const char *homedir;
                  
                  homedir = e_user_homedir_get();
-                 if (homedir)
-                   {
-                      snprintf(buf, sizeof(buf), 
"%s/.e/e/applications/bar/%s", homedir, inst->dir);
-                      free(homedir);
-                   }
+                 snprintf(buf, sizeof(buf), "%s/.e/e/applications/bar/%s", 
homedir, inst->dir);
               }
             else
               snprintf(buf, sizeof(buf), inst->dir);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to