From 355c99a077c1ae4a0d9be3f9c21ab93af0a673ca Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 12 Dec 2019 11:57:25 +0100 Subject: [PATCH] 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. --- gobject/gobject.c | 5 +++-- 1 file 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'",