minor adaption, to close filedescriptor immediatelym if possible

This commit is contained in:
ceriel
1987-03-27 15:11:06 +00:00
parent 19d29e4018
commit e3043b7dcb
5 changed files with 18 additions and 10 deletions

View File

@@ -9,5 +9,7 @@ DIR *dirp;
{
extern long lseek();
return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc);
if (dirp->dd_fd >= 0)
return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc);
return dirp->dd_loc;
}