diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2013-10-10 10:32:37 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2013-10-10 10:32:37 +0200 |
commit | 6e1ffd6cd41ba4ffb8fbc261c79ad124aa293253 (patch) | |
tree | 228ba83eec889eee445f3f4f8817eced8d02c767 | |
parent | bcd676be133e360c012b1279c1fcef9c7ede1ccf (diff) |
netsniff-ng: Use strtoul() instead of strtol() for unsigned long
If setting an unsigned long variable, use strtoul() instead of strtol().
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | netsniff-ng.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index c6e035e..50a9f75 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -1217,7 +1217,7 @@ int main(int argc, char **argv) panic("Syntax error in ring size param!\n"); *ptr = 0; - ctx.reserve_size *= strtol(optarg, NULL, 0); + ctx.reserve_size *= strtoul(optarg, NULL, 0); break; case 'b': cpu_tmp = strtol(optarg, NULL, 0); @@ -1261,10 +1261,10 @@ int main(int argc, char **argv) PRINT_HEX_ASCII : PRINT_ASCII; break; case 'k': - ctx.kpull = strtol(optarg, NULL, 0); + ctx.kpull = strtoul(optarg, NULL, 0); break; case 'n': - frame_count_max = strtol(optarg, NULL, 0); + frame_count_max = strtoul(optarg, NULL, 0); break; case 'F': ptr = optarg; @@ -1302,7 +1302,7 @@ int main(int argc, char **argv) } *ptr = 0; - ctx.dump_interval *= strtol(optarg, NULL, 0); + ctx.dump_interval *= strtoul(optarg, NULL, 0); break; case 'V': ctx.verbose = 1; |