From e104def5167250b1fe5251afa2003f84d00b0daa Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 May 2012 23:12:43 -0500 Subject: [PATCH] tuple: reverse preference of global vs local var --- tuple.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tuple.c b/tuple.c index e5cf13e..820fd89 100644 --- a/tuple.c +++ b/tuple.c @@ -71,6 +71,10 @@ char * pkg_tuple_find(pkg_tuple_t *head, const char *key) { pkg_tuple_t *node; + char *res; + + if ((res = pkg_tuple_find_global(key)) != NULL) + return res; PKG_FOREACH_LIST_ENTRY(head, node) { @@ -78,7 +82,7 @@ pkg_tuple_find(pkg_tuple_t *head, const char *key) return node->value; } - return pkg_tuple_find_global(key); + return NULL; } char *