Skip to content

Commit

Permalink
test: timer_accuracy: 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 77c25f2 commit fb82f31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/performance/odp_timer_accuracy.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static void print_usage(void)

static int parse_options(int argc, char *argv[], test_opt_t *test_opt)
{
int opt, long_index;
int opt;
const struct option longopts[] = {
{"count", required_argument, NULL, 'c'},
{"period", required_argument, NULL, 'p'},
Expand Down Expand Up @@ -230,7 +230,7 @@ static int parse_options(int argc, char *argv[], test_opt_t *test_opt)
test_opt->early_retry = 0;

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

if (opt == -1)
break; /* No more options */
Expand Down

0 comments on commit fb82f31

Please sign in to comment.