tuple: reverse preference of global vs local var

pull/15/head
William Pitcock 2012-05-06 23:12:43 -05:00
parent 0056ba63dc
commit e104def516
1 changed files with 5 additions and 1 deletions

View File

@ -71,6 +71,10 @@ char *
pkg_tuple_find(pkg_tuple_t *head, const char *key) pkg_tuple_find(pkg_tuple_t *head, const char *key)
{ {
pkg_tuple_t *node; pkg_tuple_t *node;
char *res;
if ((res = pkg_tuple_find_global(key)) != NULL)
return res;
PKG_FOREACH_LIST_ENTRY(head, node) PKG_FOREACH_LIST_ENTRY(head, node)
{ {
@ -78,7 +82,7 @@ pkg_tuple_find(pkg_tuple_t *head, const char *key)
return node->value; return node->value;
} }
return pkg_tuple_find_global(key); return NULL;
} }
char * char *