From 23c9657eb120019097b364820bc17bac5d172d12 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sat, 12 Jan 2019 00:24:53 -0800 Subject: crypto: digest: Replace 4096 with PAGE_SIZE Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- crypto/digest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto') 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) { -- cgit v1.2.3