Get rid of -Wshadow warning - I guess we're including something that
gets <getopt.h>, so we get the optarg global. svn path=/trunk/; revision=51348
This commit is contained in:
parent
b65e9e9618
commit
34108edbd1
|
@ -573,18 +573,18 @@ stats_tree_manip_node(manip_node_mode mode, stats_tree *st, const char *name,
|
||||||
|
|
||||||
|
|
||||||
extern char*
|
extern char*
|
||||||
stats_tree_get_abbr(const char *optarg)
|
stats_tree_get_abbr(const char *opt_arg)
|
||||||
{
|
{
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
/* XXX: this fails when tshark is given any options
|
/* XXX: this fails when tshark is given any options
|
||||||
after the -z */
|
after the -z */
|
||||||
g_assert(optarg != NULL);
|
g_assert(opt_arg != NULL);
|
||||||
|
|
||||||
for (i=0; optarg[i] && optarg[i] != ','; i++);
|
for (i=0; opt_arg[i] && opt_arg[i] != ','; i++);
|
||||||
|
|
||||||
if (optarg[i] == ',') {
|
if (opt_arg[i] == ',') {
|
||||||
return g_strndup(optarg,i);
|
return g_strndup(opt_arg,i);
|
||||||
} else {
|
} else {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue