summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-12 00:24:53 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-16 08:33:34 +0100
commit23c9657eb120019097b364820bc17bac5d172d12 (patch)
tree90036fb7b0bfce5a84b18bad1a3d19e315e8e2a7 /crypto
parent44f28a3a12e40489616cf7da7b61fa5f4ab61d2c (diff)
downloadbarebox-23c9657eb120019097b364820bc17bac5d172d12.tar.gz
barebox-23c9657eb120019097b364820bc17bac5d172d12.tar.xz
crypto: digest: Replace 4096 with PAGE_SIZE
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/digest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/digest.c b/crypto/digest.c
index aff6d9876a..980a694915 100644
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -232,7 +232,7 @@ int digest_file_window(struct digest *d, const char *filename,
buf = memmap(fd, PROT_READ);
if (buf == MAP_FAILED) {
- buf = xmalloc(4096);
+ buf = xmalloc(PAGE_SIZE);
flags = 1;
}
@@ -249,7 +249,7 @@ int digest_file_window(struct digest *d, const char *filename,
}
while (size) {
- now = min((ulong)4096, size);
+ now = min((ulong)PAGE_SIZE, size);
if (flags) {
now = read(fd, buf, now);
if (now < 0) {