fixed warnings.

This commit is contained in:
gunnar_g 2008-12-16 12:54:00 +00:00
parent 4dd8269439
commit 7e86b7abdc
1 changed files with 4 additions and 2 deletions

View File

@ -303,17 +303,19 @@ misc_strip_definitions_root(gchar *directory)
{ {
gchar **vector; gchar **vector;
GList *list = root_definitions_directories; GList *list = root_definitions_directories;
gchar *buf;
while (list!=NULL) while (list!=NULL)
{ {
if (g_str_has_prefix(directory, (gchar*)list->data)) if (g_str_has_prefix(directory, (gchar*)list->data))
{ {
vector = g_strsplit(directory, (gchar*)list->data,-1); vector = g_strsplit(directory, (gchar*)list->data,-1);
return g_strdup((gchar*)vector[g_strv_length(vector)-1]); buf = g_strdup((gchar*)vector[g_strv_length(vector)-1]);
g_strfreev(vector);
return buf;
} }
list = list->next; list = list->next;
} }
g_strfreev(vector);
return ""; return "";
} }