Re: [PATCH v1 2/2] tools/rtla: Remove unused optional option_index

From: Tomas Glozar

Date: Wed Oct 29 2025 - 07:12:52 EST


čt 2. 10. 2025 v 14:36 odesílatel Costa Shulyupin
<costa.shul@xxxxxxxxxx> napsal:
>
> The longindex argument of getopt_long() is optional
> and tied to the unused local variable option_index.
>
> Remove it to shorten the four longest functions
> and make the code neater.
>

Yes, this is documented in the manpage:

"If longindex is not NULL, it points to a variable which is set to the
index of the long option relative to longopts."

> Signed-off-by: Costa Shulyupin <costa.shul@xxxxxxxxxx>
> ---
> tools/tracing/rtla/src/osnoise_hist.c | 5 +----
> tools/tracing/rtla/src/osnoise_top.c | 5 +----
> tools/tracing/rtla/src/timerlat_hist.c | 5 +----
> tools/tracing/rtla/src/timerlat_top.c | 5 +----
> 4 files changed, 4 insertions(+), 16 deletions(-)
>

Reviewed-by: Tomas Glozar <tglozar@xxxxxxxxxx>

Tomas