Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/sys/stat.c

    rfdf97f6 r6afc9d7  
    8080{
    8181        struct stat hst;
    82         int rc = fstat(fd, &hst);
    83         if (rc < 0) {
    84                 /* fstat() returns negative error code instead of using errno. */
    85                 errno = -rc;
    86                 return -1;
    87         }
     82        int rc = negerrno(fstat, fd, &hst);
     83        if (rc < 0)
     84                return rc;
    8885        stat_to_posix(st, &hst);
    8986        return 0;
     
    113110{
    114111        struct stat hst;
    115         int rc = stat(path, &hst);
    116         if (rc < 0) {
    117                 /* stat() returns negative error code instead of using errno. */
    118                 errno = -rc;
    119                 return -1;
    120         }
     112        int rc = negerrno(stat, path, &hst);
     113        if (rc < 0)
     114                return rc;
    121115        stat_to_posix(st, &hst);
    122116        return 0;
Note: See TracChangeset for help on using the changeset viewer.