summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/closedir.c
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2000-12-06 03:15:49 +0000
committerdeischen <deischen@FreeBSD.org>2000-12-06 03:15:49 +0000
commitcf92dabe14c7581217daf96f6257caae8c56b826 (patch)
tree0dd5c36710eb675e55c9d6b12fdea35f32c5b68e /lib/libc/gen/closedir.c
parent507950431dac1887fe7f639efde6d9a3bcdb790f (diff)
downloadFreeBSD-src-cf92dabe14c7581217daf96f6257caae8c56b826.zip
FreeBSD-src-cf92dabe14c7581217daf96f6257caae8c56b826.tar.gz
Cleanup XXXdir functions to eliminate global hash table of
telldir positions. This will allow (future) locking on a per-DIR basis (for MT-safety). For now, this change does the following: o Remove the hash table from telldir.c. Recode to use queue macros. o Remove 'const' from 'telldir(const DIR *)'. o Remove 'register' variables as suggested in a recent thread. No response from: -current
Diffstat (limited to 'lib/libc/gen/closedir.c')
-rw-r--r--lib/libc/gen/closedir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/closedir.c b/lib/libc/gen/closedir.c
index 86de88d..69f1232 100644
--- a/lib/libc/gen/closedir.c
+++ b/lib/libc/gen/closedir.c
@@ -42,14 +42,14 @@ static char sccsid[] = "@(#)closedir.c 8.1 (Berkeley) 6/10/93";
#include <stdlib.h>
#include <unistd.h>
-extern void _reclaim_telldir __P(( const DIR * ));
+extern void _reclaim_telldir __P((DIR *));
/*
* close a directory.
*/
int
closedir(dirp)
- register DIR *dirp;
+ DIR *dirp;
{
int fd;
@@ -58,7 +58,7 @@ closedir(dirp)
dirp->dd_fd = -1;
dirp->dd_loc = 0;
free((void *)dirp->dd_buf);
- free((void *)dirp);
_reclaim_telldir(dirp);
+ free((void *)dirp);
return(_close(fd));
}
OpenPOWER on IntegriCloud