[libpeas] Small coding style cleanup
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Small coding style cleanup
- Date: Tue, 22 Sep 2015 08:09:28 +0000 (UTC)
commit 9e2a607a18f3ad585b06ea3605140889a1366e0f
Author: Garrett Regier <garrettregier gmail com>
Date: Mon Sep 21 21:33:44 2015 -0700
Small coding style cleanup
libpeas/peas-engine.c | 7 +++++--
libpeas/peas-utils.c | 13 +++++--------
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index 6776eb7..d54a758 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -1351,8 +1351,11 @@ string_in_strv (const gchar *needle,
return FALSE;
for (i = 0; haystack[i] != NULL; i++)
- if (strcmp (haystack[i], needle) == 0)
- return TRUE;
+ {
+ if (strcmp (haystack[i], needle) == 0)
+ return TRUE;
+ }
+
return FALSE;
}
diff --git a/libpeas/peas-utils.c b/libpeas/peas-utils.c
index 06952d9..ee8fef1 100644
--- a/libpeas/peas-utils.c
+++ b/libpeas/peas-utils.c
@@ -68,19 +68,16 @@ find_param_spec_in_interfaces (GPtrArray *type_structs,
const gchar *name)
{
guint i;
+ GParamSpec *pspec = NULL;
- for (i = 0; i < type_structs->len; ++i)
+ for (i = 0; i < type_structs->len && pspec == NULL; ++i)
{
- GParamSpec *pspec;
+ gpointer iface = g_ptr_array_index (type_structs, i);
- pspec = g_object_interface_find_property (g_ptr_array_index (type_structs, i),
- name);
-
- if (pspec != NULL)
- return pspec;
+ pspec = g_object_interface_find_property (iface, name);
}
- return NULL;
+ return pspec;
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]