Report an error when n
is not equal to MAXFILE
The variable `n` represents the number of blocks that have been read.
This commit is contained in:
parent
72cb3849eb
commit
7687b389c2
1 changed files with 1 additions and 1 deletions
|
@ -609,7 +609,7 @@ writebig(char *s)
|
||||||
for(;;){
|
for(;;){
|
||||||
i = read(fd, buf, BSIZE);
|
i = read(fd, buf, BSIZE);
|
||||||
if(i == 0){
|
if(i == 0){
|
||||||
if(n == MAXFILE - 1){
|
if(n != MAXFILE){
|
||||||
printf("%s: read only %d blocks from big", s, n);
|
printf("%s: read only %d blocks from big", s, n);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue