summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-12-12 11:57:25 +0100
committerThomas Haller <thaller@redhat.com>2020-11-18 13:38:53 +0100
commit355c99a077c1ae4a0d9be3f9c21ab93af0a673ca (patch)
tree2f458013bdfcae75b67d501d050d9ff7292a8b81
parent56cbdb1a66b859b3c8b6ee5072d77ca3cbedb41a (diff)
downloadglib-355c99a077c1ae4a0d9be3f9c21ab93af0a673ca.tar.gz
object: use guint type for n_params argument of g_object_new_is_valid_property()
Two out of three callers pass the count argument from a variable of type guint. And the third is currently an always positive gint. We should use the correct integer type that matches the type as it used otherwise.
-rw-r--r--gobject/gobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 6e9c44a1e..3e860da26 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2005,9 +2005,10 @@ g_object_new_is_valid_property (GType object_type,
GParamSpec *pspec,
const char *name,
GObjectConstructParam *params,
- int n_params)
+ guint n_params)
{
- gint i;
+ guint i;
+
if (G_UNLIKELY (pspec == NULL))
{
g_critical ("%s: object class '%s' has no property named '%s'",