aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-06-03 19:14:18 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2010-06-03 19:14:18 +0000
commit7be2d504aab07521fe7db991d156bb58ce8a76d9 (patch)
tree3d08811411aa3877b2f553d5e9fd2bc224970d41 /editcap.c
parent29759f124867d8e1188e804a45f1c6f328641e3b (diff)
Fix a gcc -Wshadow warning
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33077 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/editcap.c b/editcap.c
index 3cdfe59ce0..33201c4e18 100644
--- a/editcap.c
+++ b/editcap.c
@@ -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);
}
}