libxcrypt/libxcrypt-4.4.33-yescrypt_platform_cast_performance.patch

24 lines
886 B
Diff
Raw Normal View History

From 9d5e7b7307f264c2d177a1f014fa3a3b9da524df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Sun, 20 Nov 2022 09:57:15 +0100
Subject: [PATCH] alg-yescrypt-platform.c: Optimize some cast operation for
performance.
---
lib/alg-yescrypt-platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/alg-yescrypt-platform.c b/lib/alg-yescrypt-platform.c
index d68af2d..fbad1dc 100644
--- a/lib/alg-yescrypt-platform.c
+++ b/lib/alg-yescrypt-platform.c
@@ -59,7 +59,7 @@ static void *alloc_region(yescrypt_region_t *region, size_t size)
if (base != MAP_FAILED) {
base_size = new_size;
} else if (flags & MAP_HUGETLB) {
- flags &= (unsigned int)~(MAP_HUGETLB | MAP_HUGE_2MB);
+ flags &= ~(unsigned int)(MAP_HUGETLB | MAP_HUGE_2MB);
base = mmap(NULL, size, PROT_READ | PROT_WRITE, (int)flags, -1, 0);
}