[glib/glib-2-70: 13/18] gslice: Fix page size being limited to int instead of gsize




commit 88604931bbbc2e0a981ded3e874a482e308c4be9
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]