simplify pthread_attr_t stack/guard size representation
[musl] / src / stdio / fmemopen.c
index 91d52bc..7c193a5 100644 (file)
@@ -108,12 +108,7 @@ FILE *fmemopen(void *restrict buf, size_t size, const char *restrict mode)
        f->seek = mseek;
        f->close = mclose;
 
-       if (!libc.threaded) {
-               f->lock = -1;
-               f->next = libc.ofl_head;
-               if (libc.ofl_head) libc.ofl_head->prev = f;
-               libc.ofl_head = f;
-       }
+       if (!libc.threaded) f->lock = -1;
 
-       return f;
+       return __ofl_add(f);
 }