Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_shelf.c 


Log Message:
Oops. Fix sscanf usage.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_shelf.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- e_int_config_shelf.c        24 Jul 2006 16:32:34 -0000      1.17
+++ e_int_config_shelf.c        24 Jul 2006 17:44:37 -0000      1.18
@@ -94,6 +94,7 @@
    char buf[256];
    
    if (!cfdata) return;
+   if (!cfdata->o_list) return;
    
    evas = evas_object_evas_get(cfdata->o_list);
    
@@ -115,7 +116,7 @@
        label = es->name;
        if (!label) label = "shelf";
        snprintf(buf, sizeof(buf), "%s #%i", label, es->id);
-
+       
        ob = edje_object_add(evas);
         switch(es->cfg->orient)
           {
@@ -246,14 +247,14 @@
    E_Config_Dialog_Data *cfdata;
    E_Shelf *es;
    char *dummy;
-   const char *tmp;
+   char tmp[4096];
    int i;
    
    cfdata = data;
    if (!cfdata) return;
    if (!cfdata->cur_shelf) return;
 
-   tmp = strdup(cfdata->cur_shelf);
+   snprintf(tmp, sizeof(tmp), "%s", cfdata->cur_shelf);
    sscanf(tmp, "%s #%i", dummy, &i);
    es = evas_list_nth(e_shelf_list(), i);
    if (!es) return;
@@ -271,16 +272,16 @@
    E_Config_Dialog_Data *cfdata;
    E_Shelf *es;
    char *dummy;
-   const char *tmp;
+   char tmp[4096];
    int i;
    
    cfdata = data;
    if (!cfdata) return;
    if (!cfdata->cur_shelf) return;
    
-   tmp = strdup(cfdata->cur_shelf);
+   snprintf(tmp, sizeof(tmp), "%s", cfdata->cur_shelf);
    sscanf(tmp, "%s #%i", dummy, &i);
-   es = evas_list_nth(e_shelf_list(), i);
+   es = evas_list_nth(e_shelf_list(), 
e_widget_ilist_selected_get(cfdata->o_list));
    if (!es) return;
    if (!es->config_dialog) e_int_shelf_config(es);
 }



-------------------------------------------------------------------------
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