From 6e1ffd6cd41ba4ffb8fbc261c79ad124aa293253 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 10 Oct 2013 10:32:37 +0200 Subject: 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 --- netsniff-ng.c | 8 ++++---- 1 file 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; -- cgit v1.2.3-54-g00ecf elect> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
ModeNameSize