aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Caseiro <puppetmaster.e17@gmail.com>2006-02-04 14:11:32 +0100
committerPuppet_Master <puppetmaster.e17@gmail.com>2006-02-04 14:11:32 +0100
commitc40e58f9261b339bf36fe384fbbb55b221917b19 (patch)
tree2493842084b59ba97b2da1f6ea48263d98e68bc7
parentOptimising code for spell_info_get ... ;) (diff)
downloadensorcel-c40e58f9261b339bf36fe384fbbb55b221917b19.tar.gz
SEGV solved ...
OPTIMISATION WORKS VERY WELL !!!!
-rw-r--r--src/ensorcel_info_get.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ensorcel_info_get.c b/src/ensorcel_info_get.c
index e06d9f9..7f7b1de 100644
--- a/src/ensorcel_info_get.c
+++ b/src/ensorcel_info_get.c
@@ -104,7 +104,7 @@ Ecore_List *ensorcel_spell_info_get (Ecore_List * el_package_list, c
{
ensorcel_spell_details_get (list, spell_dir);
}
- //printf('DEBUG :------------: return %p\n,list);
+ //printf("DEBUG :------------: return %p\n",list);
return (list);
}
@@ -150,7 +150,6 @@ char *ensorcel_spell_lastest_get (Ecore_List * el_info)
if (!el_info)
ensorcel_error_popup("FATAL ERROR");
-
if (!ecore_list_goto_first (el_info))
ensorcel_error_popup("FATAL ERROR");
@@ -162,13 +161,18 @@ char *ensorcel_spell_lastest_get (Ecore_List * el_info)
list = ensorcel_string_split (string, '=');
ecore_list_goto_index (list, 1);
string = ecore_list_current (list);
+
+ if (!string)
+ continue;
+
if (strcmp ("$(date +%Y%m%d)", string) == 0)
return ("cvs");
else
return (string);
}
}
- free (string);
+ if (string)
+ free (string);
return ("-");
}