aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-14 06:15:07 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-14 06:15:07 +0100
commit18bda10f02872d6e0026d7187652ab3ab335cea1 (patch)
tree50d49684eb9c480b19d1e2ccf5c4772aa405ee8d /src
parentm (diff)
downloadsha3sum-18bda10f02872d6e0026d7187652ab3ab335cea1.tar.gz
sha3sum-18bda10f02872d6e0026d7187652ab3ab335cea1.tar.bz2
sha3sum-18bda10f02872d6e0026d7187652ab3ab335cea1.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/common.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/common.c b/src/common.c
index 5341d3c..a30c4a5 100644
--- a/src/common.c
+++ b/src/common.c
@@ -263,16 +263,9 @@ static int check_checksums(const char* restrict filename, const libkeccak_spec_t
}
got = read(fd, buf + ptr, blksize);
- if (got < 0)
- {
- if (errno == EINTR)
- continue;
- goto pfail;
- }
- else if (got == 0)
- break;
- else
- ptr += (size_t)got;
+ if (got < 0) goto pfail;
+ else if (got == 0) break;
+ else ptr += (size_t)got;
}
size = ptr;
close(fd), fd = -1;