[HUST CSE]fix closing the same file twice
This commit is contained in:
parent
3f442bbe4a
commit
06829534e1
|
@ -9,12 +9,12 @@ static int fclose_entry(void)
|
||||||
perror("fopen fail");
|
perror("fopen fail");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(fclose(stream))
|
if(fclose(stream) != 0)
|
||||||
{
|
{
|
||||||
perror("fclose fail");
|
perror("fclose fail");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if(fclose(stream))
|
else
|
||||||
{
|
{
|
||||||
printf("fclose sucess \n");
|
printf("fclose sucess \n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue