apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1152310 - /apr/apr/branches/1.5.x/strings/apr_snprintf.c
Date Fri, 29 Jul 2011 17:30:08 GMT
Author: rjung
Date: Fri Jul 29 17:30:07 2011
New Revision: 1152310

URL: http://svn.apache.org/viewvc?rev=1152310&view=rev
Log:
Fix flag character '#' in combination with format
character 'x' in apr snprintf implementations.

Modified:
    apr/apr/branches/1.5.x/strings/apr_snprintf.c

Modified: apr/apr/branches/1.5.x/strings/apr_snprintf.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/strings/apr_snprintf.c?rev=1152310&r1=1152309&r2=1152310&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/strings/apr_snprintf.c (original)
+++ apr/apr/branches/1.5.x/strings/apr_snprintf.c Fri Jul 29 17:30:07 2011
@@ -704,7 +704,7 @@ APR_DECLARE(int) apr_vformatter(int (*fl
     apr_int64_t i_quad = 0;
     apr_uint64_t ui_quad;
     apr_int32_t i_num = 0;
-    apr_uint32_t ui_num;
+    apr_uint32_t ui_num = 0;
 
     char num_buf[NUM_BUF_SIZE];
     char char_buf[2];                /* for printing %% and %<unknown> */
@@ -959,7 +959,7 @@ APR_DECLARE(int) apr_vformatter(int (*fl
                             &num_buf[NUM_BUF_SIZE], &s_len);
                 }
                 FIX_PRECISION(adjust_precision, precision, s, s_len);
-                if (alternate_form && i_num != 0) {
+                if (alternate_form && ui_num != 0) {
                     *--s = *fmt;        /* 'x' or 'X' */
                     *--s = '0';
                     s_len += 2;



Mime
View raw message