[PATCH] Format specifiers in rfc1867.c
| From: | David Santinoli | Date: | Thu, 05 Aug 2004 13:41:11 +0000 |
| Subject: | [PATCH] Format specifiers in rfc1867.c | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-11933@lists.php.net to get a copy of this message | ||
Hi,
while working on rfc1867.c for the MD5/SHA1 patch, I found that the
printf-style format specifiers used for diagnostic output do not always
match the declarations of the variables to be printed. The attached
patch fixes the mismatch.
Cheers,
David
--
David Santinoli, Milano + <david@santinoli.com>
Independent Linux/Unix consultant + http://www.santinoli.com
--- main/rfc1867-cvs-1.160.c 2004-08-04 16:42:17.000000000 +0200 +++ main/rfc1867.c 2004-08-05 00:26:32.000000000 +0200 @@ -786,7 +786,7 @@ zend_llist header; if (SG(request_info).content_length > SG(post_max_size)) { - sapi_module.sapi_error(E_WARNING, "POST Content-Length of %d bytes exceeds the limit of %d bytes", SG(request_info).content_length, SG(post_max_size)); + sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); return; } @@ -981,7 +981,7 @@ if (wlen < blen) { #if DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %ld", wlen, blen); + sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %d", wlen, blen); #endif cancel_upload = UPLOAD_ERROR_C; } else {
--- main/rfc1867-cvs-1.160.c 2004-08-04 16:42:17.000000000 +0200 +++ main/rfc1867.c 2004-08-05 00:26:32.000000000 +0200 @@ -786,7 +786,7 @@ zend_llist header; if (SG(request_info).content_length > SG(post_max_size)) { - sapi_module.sapi_error(E_WARNING, "POST Content-Length of %d bytes exceeds the limit of %d bytes", SG(request_info).content_length, SG(post_max_size)); + sapi_module.sapi_error(E_WARNING, "POST Content-Length of %ld bytes exceeds the limit of %ld bytes", SG(request_info).content_length, SG(post_max_size)); return; } @@ -981,7 +981,7 @@ if (wlen < blen) { #if DEBUG_FILE_UPLOAD - sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %ld", wlen, blen); + sapi_module.sapi_error(E_NOTICE, "Only %d bytes were written, expected to write %d", wlen, blen); #endif cancel_upload = UPLOAD_ERROR_C; } else {