mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
tools/ffhash: read errno before calling functions which might change it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e7513e1286
commit
39a7ded22d
@ -94,9 +94,10 @@ static int check(char *file)
|
||||
for (;;) {
|
||||
int size = read(fd, buffer, SIZE);
|
||||
if (size < 0) {
|
||||
int err = errno;
|
||||
close(fd);
|
||||
finish();
|
||||
printf("+READ-FAILED: %s", strerror(errno));
|
||||
printf("+READ-FAILED: %s", strerror(err));
|
||||
ret = 2;
|
||||
goto end;
|
||||
} else if(!size)
|
||||
|
Loading…
Reference in New Issue
Block a user