From: Tim Duesterhus Date: Mon, 18 Jan 2021 12:41:18 +0000 (+0100) Subject: CLEANUP: cache: Use proper data types in secondary_key_cmp() X-Git-Tag: v2.4-dev6~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5897cfe18e3fcead96255a1a62ef706b67adcf2c;p=thirdparty%2Fhaproxy.git CLEANUP: cache: Use proper data types in secondary_key_cmp() - hash_length is `unsigned int` and so should offset. - idx is compared to a `size_t` and thus it should also be. --- diff --git a/src/cache.c b/src/cache.c index 16dc7d61c2..f556fdc077 100644 --- a/src/cache.c +++ b/src/cache.c @@ -208,8 +208,8 @@ struct cache_entry *entry_exist(struct cache *cache, char *hash) static int secondary_key_cmp(const char *ref_key, const char *new_key) { int retval = 0; - int idx = 0; - int offset = 0; + size_t idx = 0; + unsigned int offset = 0; const struct vary_hashing_information *info; for (idx = 0; idx < sizeof(vary_information)/sizeof(*vary_information) && !retval; ++idx) {