diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-09-09 21:57:03 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-09-09 21:57:03 +0000 |
commit | 7ac8cfcce87a5dc0a0a3993ab47976f5f64d3044 (patch) | |
tree | fbc17833b9e5d319e62f189115450a37663a2d4d | |
parent | d78e18011c66dd04e4f3f3eeec95c4e7fdbd0f5c (diff) | |
download | apr-7ac8cfcce87a5dc0a0a3993ab47976f5f64d3044.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.c | 4 |
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 |