From 66d4ef3de686a67b25b0e9670570cb9aef0f668f Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Thu, 26 Aug 2021 12:33:10 +0000 Subject: apr_tables: fix petential left shift of 31 on an int. apr_tables.c:832:10: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1892618 13f79535-47bb-0310-9956-ffa450edef68 --- tables/apr_tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tables') diff --git a/tables/apr_tables.c b/tables/apr_tables.c index 6d9aff881..9dc594c13 100644 --- a/tables/apr_tables.c +++ b/tables/apr_tables.c @@ -296,8 +296,8 @@ APR_DECLARE(char *) apr_array_pstrcat(apr_pool_t *p, #define TABLE_HASH_SIZE 32 #define TABLE_INDEX_MASK 0x1f #define TABLE_HASH(key) (TABLE_INDEX_MASK & *(unsigned char *)(key)) -#define TABLE_INDEX_IS_INITIALIZED(t, i) ((t)->index_initialized & (1 << (i))) -#define TABLE_SET_INDEX_INITIALIZED(t, i) ((t)->index_initialized |= (1 << (i))) +#define TABLE_INDEX_IS_INITIALIZED(t, i) ((t)->index_initialized & (1u << (i))) +#define TABLE_SET_INDEX_INITIALIZED(t, i) ((t)->index_initialized |= (1u << (i))) /* Compute the "checksum" for a key, consisting of the first * 4 bytes, normalized for case-insensitivity and packed into -- cgit v1.2.1