lkml.org 
[lkml]   [2020]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 12/29] Input: MT - Avoid comma separated statements
    Date
    Use semicolons and braces.

    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    drivers/input/input-mt.c | 11 +++++++----
    1 file changed, 7 insertions(+), 4 deletions(-)

    diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
    index f699538bdac4..44fe6f2f063c 100644
    --- a/drivers/input/input-mt.c
    +++ b/drivers/input/input-mt.c
    @@ -323,11 +323,14 @@ static int adjust_dual(int *begin, int step, int *end, int eq, int mu)
    p = begin + step;
    s = p == end ? f + 1 : *p;

    - for (; p != end; p += step)
    - if (*p < f)
    - s = f, f = *p;
    - else if (*p < s)
    + for (; p != end; p += step) {
    + if (*p < f) {
    + s = f;
    + f = *p;
    + } else if (*p < s) {
    s = *p;
    + }
    + }

    c = (f + s + 1) / 2;
    if (c == 0 || (c > mu && (!eq || mu > 0)))
    --
    2.26.0
    \
     
     \ /
      Last update: 2020-08-25 06:57    [W:2.906 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site