Changeset 1b20da0 in mainline for uspace/app/bdsh/cmds/modules/ls/ls.c


Ignore:
Timestamp:
2018-02-28T17:52:03Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/ls/ls.c

    rdf6ded8 r1b20da0  
    129129 *                              0 otherwise.
    130130 */
    131 static signed int ls_scan_dir(const char *d, DIR *dirp, 
     131static signed int ls_scan_dir(const char *d, DIR *dirp,
    132132    struct dir_elem_t **dir_list_ptr)
    133133{
     
    198198        /* Populate the directory list. */
    199199        if (ls.recursive) {
    200                 tmp = (struct dir_elem_t *) realloc(*dir_list_ptr, 
     200                tmp = (struct dir_elem_t *) realloc(*dir_list_ptr,
    201201                    nbdirs * sizeof(struct dir_elem_t));
    202202                if (!tmp) {
    203203                        cli_error(CL_ENOMEM, "ls: failed to scan %s", d);
    204204                        goto out;
    205                 } 
     205                }
    206206                *dir_list_ptr = tmp;
    207207
     
    253253        }
    254254
    255         nbdirs = ls_scan_dir(path, dirp, &dir_list); 
     255        nbdirs = ls_scan_dir(path, dirp, &dir_list);
    256256        if (nbdirs == -1) {
    257257                ret = CMD_FAILURE;
     
    292292                        ret = CMD_FAILURE;
    293293                        goto out;
    294                 }       
     294                }
    295295        }
    296296   
    297         ret = CMD_SUCCESS; 
     297        ret = CMD_SUCCESS;
    298298
    299299out:
     
    405405                if (ls.recursive)
    406406                        ret = ls_recursive(de.name, dirp);
    407                 else 
     407                else
    408408                        ret = ls_scan_dir(de.name, dirp, NULL);
    409409
Note: See TracChangeset for help on using the changeset viewer.