aboutsummaryrefslogtreecommitdiff
path: root/util/memfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/memfd.c')
-rw-r--r--util/memfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/memfd.c b/util/memfd.c
index b3ecbac19e..d248a53c3c 100644
--- a/util/memfd.c
+++ b/util/memfd.c
@@ -66,7 +66,7 @@ int qemu_memfd_create(const char *name, size_t size, bool hugetlb,
{
int htsize = hugetlbsize ? ctz64(hugetlbsize) : 0;
- if (htsize && 1 << htsize != hugetlbsize) {
+ if (htsize && 1ULL << htsize != hugetlbsize) {
error_setg(errp, "Hugepage size must be a power of 2");
return -1;
}