diff options
author | Dario Lombardo <lomato@gmail.com> | 2016-06-23 17:40:40 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-26 06:02:45 +0000 |
commit | 46fc6f5d397219889a1355da09573dfbc7d800ac (patch) | |
tree | a7bc0fd48c815eae3f2cd2343b19873149c19816 | |
parent | 916958ca828ac55d09e641e0fe81219c96017fe3 (diff) |
ex-opt: rename shadow variable
Change-Id: Iba19920e58ffb7f1a88c2a75964c518f0479c66f
Reviewed-on: https://code.wireshark.org/review/16103
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/ex-opt.c | 6 | ||||
-rw-r--r-- | epan/ex-opt.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/epan/ex-opt.c b/epan/ex-opt.c index 59909496cd..e1e5e29a71 100644 --- a/epan/ex-opt.c +++ b/epan/ex-opt.c @@ -75,7 +75,7 @@ gint ex_opt_count(const gchar* key) { } } -const gchar* ex_opt_get_nth(const gchar* key, guint index) { +const gchar* ex_opt_get_nth(const gchar* key, guint key_index) { GPtrArray* this_opts; if (! ex_opts) @@ -84,8 +84,8 @@ const gchar* ex_opt_get_nth(const gchar* key, guint index) { this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key); if (this_opts) { - if (this_opts->len > index) { - return (const gchar *)g_ptr_array_index(this_opts,index); + if (this_opts->len > key_index) { + return (const gchar *)g_ptr_array_index(this_opts,key_index); } else { /* XXX: assert? */ return NULL; diff --git a/epan/ex-opt.h b/epan/ex-opt.h index a92e06af66..f886298c2e 100644 --- a/epan/ex-opt.h +++ b/epan/ex-opt.h @@ -40,7 +40,7 @@ WS_DLL_PUBLIC gboolean ex_opt_add(const gchar* optarg); WS_DLL_PUBLIC gint ex_opt_count(const gchar* key); /* fetches the nth argument of a given key returns NULL if there isn't */ -WS_DLL_PUBLIC const gchar* ex_opt_get_nth(const gchar* key, guint index); +WS_DLL_PUBLIC const gchar* ex_opt_get_nth(const gchar* key, guint key_index); /* extracts the next value of a given key */ WS_DLL_PUBLIC const gchar* ex_opt_get_next(const gchar* key); |