Re: [PATCH] libtracefs: Fix the label usage in check_option()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 12 Mar 2023 18:21:13 +0100
Markus Elfring <Markus.Elfring@xxxxxx> wrote:

> Date: Sun, 12 Mar 2023 18:10:36 +0100
> 
> The label “out” was used to jump to a source code place after some
> failure cases. This implementation detail hindered better exception handling.

"out" is a perfectly fine name.

> 
> Use more appropriate labels instead.
> 
> * Reorder jump targets at the end.

Why?

> 
> * Delete a condition check.

Why?

> 
> * Omit an extra initialisation (for the variable “fd”)
>   which became unnecessary with this change.
> 
> Fixes: f7951864c7766ba3d683e8676fe0e497991796b2 ("libtracefs: Unit tests for tracing options APIs")

What was fixed???

> Signed-off-by: Markus Elfring <Markus.Elfring@xxxxxx>
> ---
>  utest/tracefs-utest.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/utest/tracefs-utest.c b/utest/tracefs-utest.c
> index e0e3c07..d1ff6cf 100644
> --- a/utest/tracefs-utest.c
> +++ b/utest/tracefs-utest.c

This is a test file. It's run in tests.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux