Changeset 25ee7ec5 in mainline for uspace/lib/posix/src/pthread/keys.c


Ignore:
Timestamp:
2025-03-06T14:35:33Z (4 days ago)
Author:
Matěj Volf <git@…>
Children:
af28af6
Parents:
7064e71
git-author:
Matěj Volf <git@…> (2025-03-05 23:13:58)
git-committer:
Matěj Volf <git@…> (2025-03-06 14:35:33)
Message:

fix ccheck

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/src/pthread/keys.c

    r7064e71 r25ee7ec5  
    5858{
    5959        // initialization is done in setspecific -> if not initialized, nothing was set yet
    60         if (!fibril_initialized) return NULL;
     60        if (!fibril_initialized)
     61                return NULL;
    6162
    6263        assert(key < PTHREAD_KEYS_MAX);
     
    6768}
    6869
    69 static void pthread_key_on_fibril_exit(void) {
    70         if (!fibril_initialized) return;
     70static void pthread_key_on_fibril_exit(void)
     71{
     72        if (!fibril_initialized)
     73                return;
    7174
    7275        for (unsigned i = 0; i < PTHREAD_KEYS_MAX; i++) {
     
    7881                 */
    7982                if (key_data[i] != NULL && destructors[i] != NULL)
    80                                 destructors[i](key_data[i]);
     83                        destructors[i](key_data[i]);
    8184        }
    8285}
     
    8790                DPRINTF("initializing pthread keys\n");
    8891                errno_t res = fibril_add_exit_hook(pthread_key_on_fibril_exit);
    89                 if (res != EOK) return res;
     92                if (res != EOK)
     93                        return res;
     94
    9095                for (unsigned i = 0; i < PTHREAD_KEYS_MAX; i++) {
    9196                        key_data[i] = NULL;
Note: See TracChangeset for help on using the changeset viewer.