summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonnylamb@gnome.org>2009-10-30 21:07:47 +0000
committerJonny Lamb <jonnylamb@gnome.org>2009-11-29 15:48:52 +0000
commit5ad56646a635399d8ffd0e7ea80645b67be5eae0 (patch)
treeb149912c4fba4e17a922e5fe670275b47fda5e16
parent0b2b2413a261ef4ed755c1c83116f5dc1f23ec37 (diff)
Remove next_item marker and goto calls.
Signed-off-by: Jonny Lamb <jonnylamb@gnome.org>
-rw-r--r--libempathy/empathy-log-store-pidgin.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libempathy/empathy-log-store-pidgin.c b/libempathy/empathy-log-store-pidgin.c
index 4ea0f8756..6cb670c2d 100644
--- a/libempathy/empathy-log-store-pidgin.c
+++ b/libempathy/empathy-log-store-pidgin.c
@@ -454,7 +454,8 @@ log_store_pidgin_get_messages_for_files (EmpathyLogStore *self,
if (!g_file_test (filename, G_FILE_TEST_EXISTS))
{
DEBUG ("Filename:'%s' does not exist", filename);
- goto next_item;
+ g_object_unref (account);
+ continue;
}
if (!g_file_get_contents (filename, &buffer, &length, &error))
@@ -462,7 +463,8 @@ log_store_pidgin_get_messages_for_files (EmpathyLogStore *self,
DEBUG ("Failed to read file: %s",
error ? error->message : "no message");
g_error_free (error);
- goto next_item;
+ g_object_unref (account);
+ continue;
}
lines = g_strsplit (buffer, "\n", -1);
@@ -491,14 +493,16 @@ log_store_pidgin_get_messages_for_files (EmpathyLogStore *self,
if (hits == NULL)
{
g_strfreev (lines);
- goto next_item;
+ g_object_unref (account);
+ continue;
}
if (g_strv_length (hits) != 5)
{
g_strfreev (lines);
g_strfreev (hits);
- goto next_item;
+ g_object_unref (account);
+ continue;
}
sender_id = g_strdup (hits[1]);
@@ -608,9 +612,6 @@ log_store_pidgin_get_messages_for_files (EmpathyLogStore *self,
g_free (protocol);
g_strfreev (lines);
-
-next_item:
- g_object_unref (account);
}
DEBUG ("Parsed %d messages", g_list_length (messages));