Skip to content

Commit

Permalink
test: timer_perf: remove unused longindex
Browse files Browse the repository at this point in the history
When parsing command line arguments with `getopt_long()`, longindex
output pointer can be `NULL` if it is not needed.

Signed-off-by: Tuomas Taipale <[email protected]>
  • Loading branch information
TuomasTaipale committed Jan 15, 2025
1 parent fb82f31 commit 2a571e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/performance/odp_timer_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ static void print_usage(void)
static int parse_options(int argc, char *argv[], test_options_t *test_options)
{
int opt;
int long_index;
int ret = 0;

static const struct option longopts[] = {
Expand Down Expand Up @@ -180,7 +179,7 @@ static int parse_options(int argc, char *argv[], test_options_t *test_options)
test_options->test_rounds = 100000;

while (1) {
opt = getopt_long(argc, argv, shortopts, longopts, &long_index);
opt = getopt_long(argc, argv, shortopts, longopts, NULL);

if (opt == -1)
break;
Expand Down

0 comments on commit 2a571e4

Please sign in to comment.