gparamspecs: Tidy up a precondition

Move the `if` into the precondition assertion, eliminating one line of
code and making the function preconditions clearer to static analysers.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2022-05-25 14:41:25 +01:00
parent 96f4c2b095
commit f157c7d0d3

View File

@ -2639,8 +2639,7 @@ g_param_spec_value_array (const gchar *name,
{
GParamSpecValueArray *aspec;
if (element_spec)
g_return_val_if_fail (G_IS_PARAM_SPEC (element_spec), NULL);
g_return_val_if_fail (element_spec == NULL || G_IS_PARAM_SPEC (element_spec), NULL);
aspec = g_param_spec_internal (G_TYPE_PARAM_VALUE_ARRAY,
name,