made a bit more robust

This commit is contained in:
ceriel
1989-06-30 14:46:27 +00:00
parent 44d4a33db4
commit 9b496d5477
4 changed files with 8 additions and 3 deletions

View File

@@ -9,7 +9,9 @@
sys_close(fp)
register File *fp;
{
fp->o_flags = 0;
close(fp->o_fd);
fp->o_fd = -1;
if (fp) {
fp->o_flags = 0;
close(fp->o_fd);
fp->o_fd = -1;
}
}