[PATCH] do not call property_set_lookup before checking param validity

Guillem Jover guillem.jover at nokia.com
Fri Feb 13 10:37:11 PST 2009


Also the call was duplicated anyway later on.
---
 libhal/libhal.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libhal/libhal.c b/libhal/libhal.c
index 855b9dc..9e4b99f 100644
--- a/libhal/libhal.c
+++ b/libhal/libhal.c
@@ -657,7 +657,7 @@ property_set_lookup (const LibHalPropertySet *set, const char *key)
 LibHalPropertyType
 libhal_ps_get_type (const LibHalPropertySet *set, const char *key)
 {
-	LibHalProperty *p = property_set_lookup (set, key);
+	LibHalProperty *p;
 
 	LIBHAL_CHECK_PARAM_VALID(set, "*set", LIBHAL_PROPERTY_TYPE_INVALID);
 	LIBHAL_CHECK_PARAM_VALID(key, "*key", LIBHAL_PROPERTY_TYPE_INVALID);
-- 
1.6.0.2



More information about the hal mailing list