Ignore:
File:
1 edited

Legend:

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

    r6afc9d7 r86cf96d  
    2727 */
    2828
    29 #include <errno.h>
    3029#include <stdio.h>
    3130#include <stdlib.h>
     
    132131static unsigned int rm_single(const char *path)
    133132{
    134         if (unlink(path) != 0) {
     133        if (unlink(path)) {
    135134                cli_error(CL_EFAIL, "rm: could not remove file %s", path);
    136135                return 1;
     
    151150
    152151        fd = open(path, O_RDONLY);
    153         if (fd >= 0) {
     152        if (fd > 0) {
    154153                close(fd);
    155154                return RM_FILE;
     
    211210        rc = rmdir(path);
    212211        if (rc == 0)
    213                 return errno;
     212                return ret;
    214213
    215214        cli_error(CL_ENOTSUP, "Can not remove %s", path);
Note: See TracChangeset for help on using the changeset viewer.