diff --git a/src/bind_region.c b/src/bind_region.c index f39baecda..ec2585cc1 100644 --- a/src/bind_region.c +++ b/src/bind_region.c @@ -355,7 +355,7 @@ static int tolua_region_get_resource(lua_State * L) const char *type; const resource_type *rtype; int result = 0; - void * matches; + void * match; critbit_tree * cb = special_resources(); r = (region *)tolua_tousertype(L, 1, 0); @@ -363,8 +363,8 @@ static int tolua_region_get_resource(lua_State * L) type = tolua_tostring(L, 2, 0); LUA_ASSERT(type != NULL, "invalid parameter"); - if (cb_find_prefix(cb, type, strlen(type) + 1, &matches, 1, 0)) { - cb_get_kv(matches, &result, sizeof(result)); + if (cb_find_prefix(cb, type, strlen(type) + 1, &match, 1, 0)) { + cb_get_kv(match, &result, sizeof(result)); switch (result) { case 0: case 1: @@ -399,10 +399,10 @@ static int tolua_region_set_resource(lua_State * L) const char *type = tolua_tostring(L, 2, 0); int result, value = (int)tolua_tonumber(L, 3, 0); critbit_tree * cb = special_resources(); - void * matches; + void * match; - if (cb_find_prefix(cb, type, strlen(type) + 1, &matches, 1, 0)) { - cb_get_kv(matches, &result, sizeof(result)); + if (cb_find_prefix(cb, type, strlen(type) + 1, &match, 1, 0)) { + cb_get_kv(match, &result, sizeof(result)); switch (result) { case 0: case 1: diff --git a/src/kernel/item.c b/src/kernel/item.c index ea7e33dd5..2e4c7da74 100644 --- a/src/kernel/item.c +++ b/src/kernel/item.c @@ -384,11 +384,11 @@ const potion_type *resource2potion(const resource_type * rtype) resource_type *rt_find(const char *name) { - void * matches; + void * match; resource_type *result = 0; - if (cb_find_prefix(&cb_resources, name, strlen(name) + 1, &matches, 1, 0)) { - cb_get_kv(matches, &result, sizeof(result)); + if (cb_find_prefix(&cb_resources, name, strlen(name) + 1, &match, 1, 0)) { + cb_get_kv(match, &result, sizeof(result)); } return result; }