Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/efreet
Dir : e17/libs/efreet/src/lib Modified Files: efreet_ini.c Log Message: - if we can't parse the INI file we can't set ini->data so return NULL instead of an invalid ini file =================================================================== RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_ini.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- efreet_ini.c 7 May 2008 02:16:50 -0000 1.11 +++ efreet_ini.c 7 May 2008 03:04:58 -0000 1.12 @@ -55,6 +55,7 @@ if (!ini) return NULL; ini->data = efreet_ini_parse(file); + if (!ini->data) FREE(ini); return ini; } @@ -79,8 +80,7 @@ f = fopen(file, "rb"); if (!f) return NULL; - if (fstat(fileno(f), &file_stat) - || file_stat.st_size < 1) + if (fstat(fileno(f), &file_stat) || file_stat.st_size < 1) { fclose(f); return NULL; @@ -274,7 +274,7 @@ EAPI int efreet_ini_section_set(Efreet_Ini *ini, const char *section) { - if (!ini || !ini->data || !section) return 0; + if (!ini || !(ini->data) || !section) return 0; ini->section = ecore_hash_get(ini->data, section); return (ini->section ? 1 : 0); ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs