ghash: Turn mod into guint

The only signed arithmetic left is the version. Keep it at that for now
but turn mod into unsigned for all other unsigned operations.
This commit is contained in:
Tobias Stoeckmann
2025-09-06 22:56:05 +02:00
parent 2b51b57f05
commit cd7f7b29e7

View File

@@ -211,7 +211,7 @@
struct _GHashTable
{
guint size;
gint mod;
guint mod;
guint mask;
guint nnodes;
guint noccupied; /* nnodes + tombstones */
@@ -256,8 +256,7 @@ G_STATIC_ASSERT (G_ALIGNOF (GHashTableIter) >= G_ALIGNOF (RealIter));
* then works modulo 2^n. The prime modulo is necessary to get a
* good distribution with poor hash functions.
*/
static const gint prime_mod [] =
{
static const guint prime_mod[] = {
1, /* For 1 << 0 */
2,
3,