mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 11:30:01 +08:00
[HUST CSE]fix closing the same file twice
This commit is contained in:
@@ -9,12 +9,12 @@ static int fclose_entry(void)
|
||||
perror("fopen fail");
|
||||
return -1;
|
||||
}
|
||||
if(fclose(stream))
|
||||
if(fclose(stream) != 0)
|
||||
{
|
||||
perror("fclose fail");
|
||||
return -1;
|
||||
}
|
||||
if(fclose(stream))
|
||||
else
|
||||
{
|
||||
printf("fclose sucess \n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user