Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/uuid.c

    r582a0b8 rc718bda  
    4343 *
    4444 * @param uuid Place to store generated UUID
    45  * @return EOK on success or negative error code
     45 * @return EOK on success or an error code
    4646 */
    47 int uuid_generate(uuid_t *uuid)
     47errno_t uuid_generate(uuid_t *uuid)
    4848{
    4949        int i;
     
    5252        /* XXX This is a rather poor way of generating random numbers */
    5353        gettimeofday(&tv, NULL);
    54         srandom(tv.tv_sec ^ tv.tv_usec);
     54        srand(tv.tv_sec ^ tv.tv_usec);
    5555
    5656        for (i = 0; i < uuid_bytes; i++)
    57                 uuid->b[i] = random();
     57                uuid->b[i] = rand();
    5858
    5959        /* Version 4 UUID from random or pseudo-random numbers */
     
    100100 * @param endptr Place to store pointer to end of UUID or @c NULL
    101101 *
    102  * @return EOK on success or negative error code
     102 * @return EOK on success or an error code
    103103 */
    104 int uuid_parse(const char *str, uuid_t *uuid, const char **endptr)
     104errno_t uuid_parse(const char *str, uuid_t *uuid, const char **endptr)
    105105{
    106         int rc;
     106        errno_t rc;
    107107        const char *eptr;
    108108        uint32_t time_low;
     
    167167 * @return EOK on success, ENOMEM if out of memory
    168168 */
    169 int uuid_format(uuid_t *uuid, char **rstr)
     169errno_t uuid_format(uuid_t *uuid, char **rstr)
    170170{
    171171        return ENOTSUP;
Note: See TracChangeset for help on using the changeset viewer.