summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/fclose.c')
-rw-r--r--lib/libc/stdio/fclose.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/libc/stdio/fclose.c b/lib/libc/stdio/fclose.c
index 0d6fd80..e70a2da 100644
--- a/lib/libc/stdio/fclose.c
+++ b/lib/libc/stdio/fclose.c
@@ -51,8 +51,7 @@ static const char rcsid[] =
#include "local.h"
int
-fclose(fp)
- FILE *fp;
+fclose(FILE *fp)
{
int r;
@@ -70,15 +69,9 @@ fclose(fp)
FREEUB(fp);
if (HASLB(fp))
FREELB(fp);
- FUNLOCKFILE(fp);
fp->_file = -1;
fp->_r = fp->_w = 0; /* Mess up if reaccessed. */
-#if 0
- if (fp->_lock != NULL) {
- _pthread_mutex_destroy((pthread_mutex_t *)&fp->_lock);
- fp->_lock = NULL;
- }
-#endif
fp->_flags = 0; /* Release this FILE for reuse. */
+ FUNLOCKFILE(fp);
return (r);
}
OpenPOWER on IntegriCloud