diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 16:12:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-10-25 16:12:16 +0200 |
commit | 39a7ded22df3f0bae46706800da6eeede744c14f (patch) | |
tree | dd01e596535a9a11148707c60f8c35fc19576114 /tools | |
parent | e7513e1286ca1b747485f950b0e1c93612b6736c (diff) | |
download | ffmpeg-39a7ded22df3f0bae46706800da6eeede744c14f.tar.gz |
tools/ffhash: read errno before calling functions which might change it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/ffhash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/ffhash.c b/tools/ffhash.c index a9f71c26c5..6942527732 100644 --- a/tools/ffhash.c +++ b/tools/ffhash.c @@ -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) |