about summary refs log tree commit diff
path: root/src/stdio/__fdopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/__fdopen.c')
-rw-r--r--src/stdio/__fdopen.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/stdio/__fdopen.c b/src/stdio/__fdopen.c
index ef8f47dc..8d6ce813 100644
--- a/src/stdio/__fdopen.c
+++ b/src/stdio/__fdopen.c
@@ -54,13 +54,7 @@ FILE *__fdopen(int fd, const char *mode)
 	if (!libc.threaded) f->lock = -1;
 
 	/* Add new FILE to open file list */
-	OFLLOCK();
-	f->next = libc.ofl_head;
-	if (libc.ofl_head) libc.ofl_head->prev = f;
-	libc.ofl_head = f;
-	OFLUNLOCK();
-
-	return f;
+	return __ofl_add(f);
 }
 
 weak_alias(__fdopen, fdopen);