return 0 not null string when user has a ctty but no utmp entry
[unix-history] / usr / src / lib / libc / gen / closedir.c
CommitLineData
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)
8static 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 */
17void
18closedir(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}