summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2021-09-09 21:57:03 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2021-09-09 21:57:03 +0000
commit054c392ccf31f456e8ec84d02ea9f8b280e3f321 (patch)
treefbc17833b9e5d319e62f189115450a37663a2d4d
parenta8f86cf5bcaa4544ad3ab603bc07774124c19b12 (diff)
downloadlibapr-054c392ccf31f456e8ec84d02ea9f8b280e3f321.tar.gz
Merge r1892618 from trunk:
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'. Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1893197 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--tables/apr_tables.c4
1 files changed, 2 insertions, 2 deletions
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