summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-06-12 13:37:16 -0400
committerColin Walters <walters@verbum.org>2014-06-12 13:38:27 -0400
commit09498e52bbc71496cd1b99ad5c8781783a864881 (patch)
treea3313a4c3f8db023b61094bc9495590bd708cd0b
parentf7d7e5ab2f3f9421f9df5d76487f37d4bdc78088 (diff)
gparam: Remove unnecessary conditionals around preconditions
These cause a static analyzer to think we're trying to actually handle them being NULL, which is not the case. They both must not be NULL, period. No idea why the code was like this originally. Reviewed by mclasen on IRC.
-rw-r--r--gobject/gparam.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gobject/gparam.c b/gobject/gparam.c
index 80a553ba3..c69ee028b 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -1062,11 +1062,8 @@ g_param_spec_pool_lookup (GParamSpecPool *pool,
GParamSpec *pspec;
gchar *delim;
- if (!pool || !param_name)
- {
- g_return_val_if_fail (pool != NULL, NULL);
- g_return_val_if_fail (param_name != NULL, NULL);
- }
+ g_return_val_if_fail (pool != NULL, NULL);
+ g_return_val_if_fail (param_name != NULL, NULL);
g_mutex_lock (&pool->mutex);