From 2677ec560aeb79c0f4a737bbc2ba68db88fbb3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erick=20P=C3=A9rez=20Castellanos?= Date: Sat, 16 May 2015 18:10:18 -0400 Subject: [PATCH] source-dialog: avoid unneeded comparisons Sources are unique, so the comparison can be avoided once the source is found --- src/gcal-source-dialog.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c index 76a08606..b6038f29 100644 --- a/src/gcal-source-dialog.c +++ b/src/gcal-source-dialog.c @@ -281,7 +281,10 @@ add_source (GcalManager *manager, for (l = children; l != NULL; l = l->next) { if (g_object_get_data (l->data, "source") == source) - contains_source = TRUE; + { + contains_source = TRUE; + break; + } } if (!contains_source)