projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7513e1
)
tools/ffhash: read errno before calling functions which might change it
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 25 Oct 2014 14:12:16 +0000
(16:12 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 25 Oct 2014 14:12:16 +0000
(16:12 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tools/ffhash.c
patch
|
blob
|
history
diff --git
a/tools/ffhash.c
b/tools/ffhash.c
index
a9f71c2
..
6942527
100644
(file)
--- 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(err
no
));
+ printf("+READ-FAILED: %s", strerror(err));
ret = 2;
goto end;
} else if(!size)