[PATCH 3/6] crypto: digest: Replace 4096 with PAGE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 crypto/digest.c | 4 ++--
 1 file 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) {
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux