do not leak list.
2007-12-21 Paolo Borelli <pborelli@katamail.com> * src/core/core.c (meta_invalidate_default_icons): do not leak list. * src/core/edge-resistance.c (meta_display_compute_resistance_and_snapping_edges): ditto. * src/core/workspace.c (meta_workspace_index): small cleanup in list handling. svn path=/trunk/; revision=3495
This commit is contained in:

committed by
Paolo Borelli

parent
5dc41f8c94
commit
b9e1a9159e
@ -357,23 +357,14 @@ meta_workspace_activate (MetaWorkspace *workspace,
|
||||
int
|
||||
meta_workspace_index (MetaWorkspace *workspace)
|
||||
{
|
||||
GList *tmp;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
i = 0;
|
||||
tmp = workspace->screen->workspaces;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
if (tmp->data == workspace)
|
||||
return i;
|
||||
ret = g_list_index (workspace->screen->workspaces, workspace);
|
||||
|
||||
++i;
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
if (ret < 0)
|
||||
meta_bug ("Workspace does not exist to index!\n");
|
||||
|
||||
meta_bug ("Workspace does not exist to index!\n");
|
||||
return -1; /* compiler warnings */
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* get windows contained on workspace, including workspace->windows
|
||||
|
Reference in New Issue
Block a user