Changeset a701812 in mainline


Ignore:
Timestamp:
2011-07-19T20:04:59Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0803134, 5baf209, 6a44ee4
Parents:
4118f5f
Message:

Use str_size() instead of str_length() in ls.

File:
1 edited

Legend:

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

    r4118f5f ra701812  
    169169               
    170170                /* fill the name field */
    171                 tosort[nbdirs].name = (char *) malloc(str_length(dp->d_name) + 1);
     171                tosort[nbdirs].name = (char *) malloc(str_size(dp->d_name) + 1);
    172172                if (!tosort[nbdirs].name) {
    173173                        cli_error(CL_ENOMEM, "ls: failed to scan %s", d);
    174174                        goto out;
    175175                }
    176                
    177                 str_cpy(tosort[nbdirs].name, str_length(dp->d_name) + 1, dp->d_name);
     176
     177                str_cpy(tosort[nbdirs].name, str_size(dp->d_name) + 1, dp->d_name);
    178178                len = snprintf(buff, PATH_MAX - 1, "%s/%s", d, tosort[nbdirs].name);
    179179                buff[len] = '\0';
Note: See TracChangeset for help on using the changeset viewer.