[glib: 14/19] gslice: Fix page size being limited to int instead of gsize




commit 0abf51e0de0552c558d101568eabe891cd72acea
Author: Egor Bychin <e bychin drweb com>
Date:   Mon Oct 11 14:11:39 2021 +0300

    gslice: Fix page size being limited to int instead of gsize

 glib/gslice.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gslice.c b/glib/gslice.c
index 690d21e07..630b6bc85 100644
--- a/glib/gslice.c
+++ b/glib/gslice.c
@@ -1307,7 +1307,7 @@ static gsize
 allocator_aligned_page_size (Allocator *allocator,
                              gsize      n_bytes)
 {
-  gsize val = 1 << g_bit_storage (n_bytes - 1);
+  gsize val = (gsize) 1 << g_bit_storage (n_bytes - 1);
   val = MAX (val, allocator->min_page_size);
   return val;
 }


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