Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-25 18:12:16 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-10-25 18:12:16 +0400
commit39a7ded22df3f0bae46706800da6eeede744c14f (patch)
treedd01e596535a9a11148707c60f8c35fc19576114 /tools
parente7513e1286ca1b747485f950b0e1c93612b6736c (diff)
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.c3
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)