From f474c5031e5b8c5833342a504c6e33941a5103f0 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 8 Dec 2016 11:09:10 +0100 Subject: 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 --- astraceroute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'astraceroute.c') diff --git a/astraceroute.c b/astraceroute.c index 9600921..98b97e4 100644 --- a/astraceroute.c +++ b/astraceroute.c @@ -929,7 +929,7 @@ static int main_trace(struct ctx *ctx) int main(int argc, char **argv) { - int c, opt_index, ret; + int c, ret; struct ctx ctx; setfsuid(getuid()); @@ -949,7 +949,7 @@ int main(int argc, char **argv) ctx.bind_addr = NULL; while ((c = getopt_long(argc, argv, short_options, long_options, - &opt_index)) != EOF) { + NULL)) != EOF) { switch (c) { case 'h': help(); -- cgit v1.2.3-54-g00ecf