summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fdopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/fdopen.c')
-rw-r--r--lib/libc/stdio/fdopen.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/libc/stdio/fdopen.c b/lib/libc/stdio/fdopen.c
index c5db3854..bded5f27 100644
--- a/lib/libc/stdio/fdopen.c
+++ b/lib/libc/stdio/fdopen.c
@@ -1,10 +1,7 @@
-#include "__stdio.h" // for __FILE, __libc_fadd
-#include "features.h" // for __weak
-#include "stdatomic.h" // for atomic_flag_clear
-#include "stddef.h" // for NULL
-
-#include <stdio.h> // for FILE, _IONBF, SEEK_END, _IOLBF, fdopen
-#include <stdlib.h> // for calloc, free
+#include "__stdio.h" // for __FILE, __libc_fadd
+#include <stdio.h> // for FILE, _IONBF, SEEK_END, _IOLBF, fdopen
+#include <stdlib.h> // for calloc, free
+#include <sys/cdefs.h>
#include <unistd.h> // for lseek, off_t
__weak void __stdio_cleanup(void)
@@ -15,8 +12,7 @@ FILE *fdopen(int fildes, const char *mode)
{
FILE *stream;
- if (mode == NULL ||
- (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a')) {
+ if (mode == NULL || (mode[0] != 'r' && mode[0] != 'w' && mode[0] != 'a')) {
return NULL;
}