[LTP] [PATCH V2 03/14] mem/oom: fix the timeout issue

Richard Palethorpe rpalethorpe@suse.de
Thu Jul 13 11:06:44 CEST 2017


Li Wang writes:

> +       if (tst_test->timeout) {
> +               if (tst_test->timeout > 0)
> +                       tst_set_timeout(tst_test->timeout);
> +       } else {
>                 tst_set_timeout(300);
> +       }

Only a minor nit, but it is easier to read without nesting, so we could have:

if (tst_test->timeout > 0) {
   tst_set_timeout(tst_test->timeout);
} else if (tst_test->timeout == 0) {
   tst_set_timeout(300);
}

-- 
Thank you,
Richard.


More information about the ltp mailing list