]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport http://svn.apache.org/viewvc?view=revision&revision=892260
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 1 Mar 2010 17:57:46 +0000 (17:57 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 1 Mar 2010 17:57:46 +0000 (17:57 +0000)
ignored the subsequent data type correction of the patch on trunk.

Rather than veto, simply correct this allocation to eliminate a data
type mismatch/truncation of the results of apr_atoi64(), quieting the
only warnings of a win32 build of 2.2 branch.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@917613 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_disk_cache.c
modules/cache/mod_mem_cache.c

index 7c50cd05cbc32617b0e88dcb87e34d279dced1d2..f13800b3067b242a70a49cf0566a6edfa438ccf8 100644 (file)
@@ -1062,7 +1062,7 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r,
             return APR_EGENERAL;
         }
         if (cl_header) {
-            apr_size_t cl = apr_atoi64(cl_header);
+            apr_int64_t cl = apr_atoi64(cl_header);
             if ((errno == 0) && (dobj->file_size != cl)) {
                 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                              "disk_cache: URL %s didn't receive complete response, not caching",
index 0edf0ffa424e45bf680479bd91dd8ad82e75e69e..fb988915a1dbce3c2a4cba8df18173715b0ac2d0 100644 (file)
@@ -747,7 +747,7 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri
         if (APR_BUCKET_IS_EOS(e)) {
             const char *cl_header = apr_table_get(r->headers_out, "Content-Length");
             if (cl_header) {
-                apr_size_t cl = apr_atoi64(cl_header);
+                apr_int64_t cl = apr_atoi64(cl_header);
                 if ((errno == 0) && (obj->count != cl)) {
                     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                                  "mem_cache: URL %s didn't receive complete response, not caching",