• Rafaël Carré's avatar
    ncurses: cosmetics · f78010cf
    Rafaël Carré authored
    Remove braces around a single statement
    Merge some comparisons
    "( a )"             -> "(a)"
    "if(x)"             -> "if (x)"
    "if (x == NULL)"    -> "if (!x)"
    "if (x != NULL)"    -> "if (x)"
    
    ReadDir: Invert logic to have less indentation:
    {
        if( a )
            x();
        else
            y();
    }
    ====>
    {
        if( !a )
        {
            y();
            return;
        }
    
        x();
    }
    f78010cf
ncurses.c 79.1 KB