From b3f1aab6e984ed00cd40693bbe72ec15a95e6e9a Mon Sep 17 00:00:00 2001 From: Tomas Mlcoch Date: Thu, 14 May 2015 07:53:00 +0200 Subject: [PATCH] mergerepo_c: Refactoring --- src/mergerepo_c.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mergerepo_c.c b/src/mergerepo_c.c index 1b2ae12..fc105e6 100644 --- a/src/mergerepo_c.c +++ b/src/mergerepo_c.c @@ -212,11 +212,9 @@ static GOptionEntry cmd_entries[] = GSList * append_arch(GSList *list, gchar *arch, gboolean koji) { - GSList *elem; - // Try to find arch in the list - for (elem = list; elem; elem = g_slist_next(elem)) { - if (!strcmp(elem->data, arch)) + for (GSList *elem = list; elem; elem = g_slist_next(elem)) { + if (!g_strcmp0(elem->data, arch)) return list; // Arch already exists } -- 2.7.4