Commit | Line | Data |
---|---|---|
bb0cfa24 DF |
1 | /* |
2 | * Copyright (c) 1983 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
2ce81398 DS |
7 | #if defined(LIBC_SCCS) && !defined(lint) |
8 | static char sccsid[] = "@(#)closedir.c 5.2 (Berkeley) %G%"; | |
9 | #endif LIBC_SCCS and not lint | |
4ddae876 | 10 | |
c4a04593 | 11 | #include <sys/param.h> |
455b164d | 12 | #include <sys/dir.h> |
4ddae876 KM |
13 | |
14 | /* | |
15 | * close a directory. | |
16 | */ | |
17 | void | |
18 | closedir(dirp) | |
b21c6bbd | 19 | register DIR *dirp; |
4ddae876 KM |
20 | { |
21 | close(dirp->dd_fd); | |
b21c6bbd KM |
22 | dirp->dd_fd = -1; |
23 | dirp->dd_loc = 0; | |
4ddae876 KM |
24 | free(dirp); |
25 | } |