mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gobject/gobject.c: Tweak conditional to pacify static analysis
It can't easily see that value is always non-NULL here; this equivalent tweak will show that it is.
This commit is contained in:
parent
f731dd376c
commit
7b0139b9f4
@ -1729,7 +1729,7 @@ g_object_new_with_custom_constructor (GObjectClass *class,
|
||||
break;
|
||||
}
|
||||
|
||||
if (j == n_params)
|
||||
if (value == NULL)
|
||||
{
|
||||
value = &cvalues[cvals_used++];
|
||||
g_value_init (value, pspec->value_type);
|
||||
@ -1855,7 +1855,7 @@ g_object_new_internal (GObjectClass *class,
|
||||
break;
|
||||
}
|
||||
|
||||
if (j == n_params)
|
||||
if (value == NULL)
|
||||
value = g_param_spec_get_default_value (pspec);
|
||||
|
||||
object_set_property (object, pspec, value, nqueue);
|
||||
|
Loading…
Reference in New Issue
Block a user