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

@@ -12,5 +12,6 @@ sys_read(fp, bufptr, bufsiz, pnbytes)
char *bufptr;
int bufsiz, *pnbytes;
{
if (! fp) return 0;
return (*pnbytes = read(fp->o_fd, bufptr, bufsiz)) >= 0;
}