Changeset 0d0b319 in mainline for uspace/lib/posix/source/time.c


Ignore:
Timestamp:
2018-01-04T20:03:02Z (6 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:
3c7702c0
Parents:
10de842
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 19:18:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:03:02)
Message:

Flip error constants to positive values, and update libposix for the change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/time.c

    r10de842 r0d0b319  
    4141
    4242#include "posix/ctype.h"
    43 #include "posix/errno.h"
     43
     44#include <errno.h>
     45
    4446#include "posix/signal.h"
    4547#include "posix/assert.h"
     
    100102    struct tm *restrict result)
    101103{
    102         int rc = time_utc2tm(*timer, result);
    103         if (rc != EOK) {
    104                 errno = rc;
     104        if (failed(time_utc2tm(*timer, result))) {
    105105                return NULL;
    106106        }
     
    197197char *posix_ctime_r(const time_t *timer, char *buf)
    198198{
    199         int r = time_local2str(*timer, buf);
    200         if (r != EOK) {
    201                 errno = r;
     199        if (failed(time_local2str(*timer, buf))) {
    202200                return NULL;
    203201        }
Note: See TracChangeset for help on using the changeset viewer.