summaryrefslogtreecommitdiff
path: root/bpfc.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-12-08 11:09:10 +0100
committerTobias Klauser <tklauser@distanz.ch>2016-12-08 11:12:13 +0100
commitf474c5031e5b8c5833342a504c6e33941a5103f0 (patch)
tree3e797a93eea85fe6c82c20f1f762bfc4f4c0d39d /bpfc.c
parentbf0df3ec1875df4b167aedd0fff25e7e56408b6b (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 'bpfc.c')
-rw-r--r--bpfc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bpfc.c b/bpfc.c
index a45bc98..bf14147 100644
--- a/bpfc.c
+++ b/bpfc.c
@@ -82,7 +82,7 @@ static void __noreturn version(void)
int main(int argc, char **argv)
{
- int ret, verbose = 0, c, opt_index, bypass = 0, format = 0;
+ int ret, verbose = 0, c, bypass = 0, format = 0;
bool invoke_cpp = false;
char **cpp_argv = NULL;
size_t cpp_argc = 0;
@@ -94,8 +94,8 @@ int main(int argc, char **argv)
if (argc == 1)
help();
- while ((c = getopt_long(argc, argv, short_options,
- long_options, &opt_index)) != EOF) {
+ while ((c = getopt_long(argc, argv, short_options, long_options,
+ NULL)) != EOF) {
switch (c) {
case 'h':
help();