Fix declaration of index shadows global

Change-Id: I14030ab86c5f3a3fe28b6102f7c0d84494b138e2
Reviewed-on: https://code.wireshark.org/review/1234
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Evan Huus 2014-04-21 11:57:06 -04:00
parent d47ae54806
commit 38b086152b
1 changed files with 5 additions and 5 deletions

View File

@ -4925,15 +4925,15 @@ header_field_info *
proto_get_next_protocol_field(const int proto_id, void **cookie)
{
protocol_t *protocol = find_protocol_by_id(proto_id);
guint index = GPOINTER_TO_INT(*cookie);
guint i = GPOINTER_TO_INT(*cookie);
index++;
i++;
if (index >= protocol->fields->len)
if (i >= protocol->fields->len)
return NULL;
*cookie = GINT_TO_POINTER(index);
return (header_field_info *)g_ptr_array_index(protocol->fields, index);
*cookie = GINT_TO_POINTER(i);
return (header_field_info *)g_ptr_array_index(protocol->fields, i);
}
protocol_t *