diff options
author | Bill Meier <wmeier@newsguy.com> | 2010-06-03 19:14:18 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2010-06-03 19:14:18 +0000 |
commit | 5a307bb6d1c6c09c20e34f381db9425517f335c8 (patch) | |
tree | 3d08811411aa3877b2f553d5e9fd2bc224970d41 /editcap.c | |
parent | 673a9de3310c0d34a7944d3b522e734076d2f84d (diff) | |
download | wireshark-5a307bb6d1c6c09c20e34f381db9425517f335c8.tar.gz wireshark-5a307bb6d1c6c09c20e34f381db9425517f335c8.tar.bz2 wireshark-5a307bb6d1c6c09c20e34f381db9425517f335c8.zip |
Fix a gcc -Wshadow warning
svn path=/trunk/; revision=33077
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -369,18 +369,18 @@ set_time_adjustment(char *optarg_str_p) } static void -set_strict_time_adj(char *optarg) +set_strict_time_adj(char *optarg_str_p) { char *frac, *end; long val; size_t frac_digits; - if (!optarg) + if (!optarg_str_p) return; /* skip leading whitespace */ - while (*optarg == ' ' || *optarg == '\t') { - optarg++; + while (*optarg_str_p == ' ' || *optarg_str_p == '\t') { + optarg_str_p++; } /* @@ -388,25 +388,25 @@ set_strict_time_adj(char *optarg) * A negative strict adjustment value is a flag * to adjust all frames by the specifed delta time. */ - if (*optarg == '-') { + if (*optarg_str_p == '-') { strict_time_adj.is_negative = 1; - optarg++; + optarg_str_p++; } /* collect whole number of seconds, if any */ - if (*optarg == '.') { /* only fractional (i.e., .5 is ok) */ + if (*optarg_str_p == '.') { /* only fractional (i.e., .5 is ok) */ val = 0; - frac = optarg; + frac = optarg_str_p; } else { - val = strtol(optarg, &frac, 10); - if (frac == NULL || frac == optarg || val == LONG_MIN || val == LONG_MAX) { + val = strtol(optarg_str_p, &frac, 10); + if (frac == NULL || frac == optarg_str_p || val == LONG_MIN || val == LONG_MAX) { fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n", - optarg); + optarg_str_p); exit(1); } if (val < 0) { /* implies '--' since we caught '-' above */ fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n", - optarg); + optarg_str_p); exit(1); } } @@ -423,7 +423,7 @@ set_strict_time_adj(char *optarg) if (*frac != '.' || end == NULL || end == frac || val < 0 || val > ONE_MILLION || val == LONG_MIN || val == LONG_MAX) { fprintf(stderr, "editcap: \"%s\" isn't a valid time adjustment\n", - optarg); + optarg_str_p); exit(1); } } |