diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2016-12-08 11:09:10 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-12-08 11:12:13 +0100 |
commit | f474c5031e5b8c5833342a504c6e33941a5103f0 (patch) | |
tree | 3e797a93eea85fe6c82c20f1f762bfc4f4c0d39d /netsniff-ng.c | |
parent | bf0df3ec1875df4b167aedd0fff25e7e56408b6b (diff) |
all: Remove unused longindex parameter to getopt_long()
All tools (except mausezahn) use getopt_long() and pass a pointer to a
local opt_index variable for the longindex parameter. However, this
variable is never read afterwards.
According to getopt(3) it's perfectly fine to pass NULL as the longindex
parameter instead, so do that.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'netsniff-ng.c')
-rw-r--r-- | netsniff-ng.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c index ce37e10..bbffe72 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -1286,7 +1286,7 @@ static void __noreturn version(void) int main(int argc, char **argv) { char *ptr; - int c, i, j, cpu_tmp, opt_index, ops_touched = 0, vals[4] = {0}; + int c, i, j, cpu_tmp, ops_touched = 0, vals[4] = {0}; bool prio_high = false, setsockmem = true; void (*main_loop)(struct ctx *ctx) = NULL; struct ctx ctx; @@ -1296,7 +1296,7 @@ int main(int argc, char **argv) srand(start_time); while ((c = getopt_long(argc, argv, short_options, long_options, - &opt_index)) != EOF) { + NULL)) != EOF) { switch (c) { case 'd': case 'i': |