Changeset 134ac5d in mainline for uspace/lib/pcut/src/os/stdc.c


Ignore:
Timestamp:
2014-06-06T07:54:24Z (10 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8db09e4
Parents:
eeb23f2d
Message:

Update PCUT to newest version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/src/os/stdc.c

    reeb23f2d r134ac5d  
    5454        return strchr(haystack, needle);
    5555}
     56
     57void pcut_str_error(int error, char *buffer, int size) {
     58        const char *str = strerror(error);
     59        if (str == NULL) {
     60                str = "(strerror failure)";
     61        }
     62        strncpy(buffer, str, size - 1);
     63        /* Ensure correct termination. */
     64        buffer[size - 1] = 0;
     65}
Note: See TracChangeset for help on using the changeset viewer.