X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=php_http_cache_api.h;h=3e882c9e2fd57b6a688ce9554b72d6e79dc93f49;hb=1e4135540cb45994d2fc3ef3ede3bc168a7d839c;hp=be59f5702c82317b8e29103d2a07f9b8de7b168b;hpb=07a5d1ec8f9b47b41c701d97ef0ec0bffbbd5909;p=m6w6%2Fext-http diff --git a/php_http_cache_api.h b/php_http_cache_api.h index be59f57..3e882c9 100644 --- a/php_http_cache_api.h +++ b/php_http_cache_api.h @@ -86,8 +86,8 @@ static inline void *_http_etag_init(TSRMLS_D) #ifdef HAVE_LIBMHASH default: - if ((mode < 0) || (mode > mhash_count()) || (!(ctx = mhash_init(mode)))) { - http_error_ex(HE_ERROR, HE_RUNTIME, "Invalid ETag mode: %ld", mode); + if ((mode < 0) || ((ulong)mode > mhash_count()) || (!(ctx = mhash_init(mode)))) { + http_error_ex(HE_ERROR, HTTP_E_RUNTIME, "Invalid ETag mode: %ld", mode); } break; #endif @@ -140,14 +140,14 @@ static inline void _http_etag_update(void *ctx, const char *data_ptr, size_t dat switch (INI_INT("http.etag_mode")) { case HTTP_ETAG_SHA1: - PHP_SHA1Update(ctx, data_ptr, data_len); + PHP_SHA1Update(ctx, (const unsigned char *) data_ptr, data_len); break; case HTTP_ETAG_MD5: #ifndef HAVE_LIBMHASH default: #endif - PHP_MD5Update(ctx, data_ptr, data_len); + PHP_MD5Update(ctx, (const unsigned char *) data_ptr, data_len); break; #ifdef HAVE_LIBMHASH