made a bit more robust

This commit is contained in:
ceriel
1989-06-30 14:46:27 +00:00
parent 7d131a2cd5
commit 46b57440a0
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;
}