]> granicus.if.org Git - php/commitdiff
initialize variables
authorAntony Dovgal <tony2001@php.net>
Thu, 7 Dec 2006 20:45:58 +0000 (20:45 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 7 Dec 2006 20:45:58 +0000 (20:45 +0000)
Zend/zend_strtod.c
ext/standard/formatted_print.c

index 01091fd36ab7d13322073077d3445c99ac2c4e80..4fed8c3552f3d9a62554b8a69a8cbbbf83e55efb 100644 (file)
@@ -1449,9 +1449,9 @@ ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sig
         to hold the suppressed trailing zeros.
     */
 
-       int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
+       int bbits, b2, b5, be, dig, i, ieps, ilim = 0, ilim0, ilim1,
                j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
-               spec_case, try_quick;
+               spec_case = 0, try_quick;
        Long L;
 #ifndef Sudden_Underflow
        int denorm;
@@ -1828,9 +1828,9 @@ bump_up:
                        b2 += Log2P;
                        s2 += Log2P;
                        spec_case = 1;
-               }
-               else
+               } else {
                        spec_case = 0;
+               }
        }
 
        /* Arrange for convenient computation of quotients:
index 07b2b445b3fbbecf14ba79f95eac00db044a1698..c0e36ce043a763eb6b2e12be5e9eccea3fef6846 100644 (file)
@@ -196,9 +196,8 @@ php_sprintf_appenddouble(char **buffer, int *pos,
                                                 TSRMLS_DC)
 {
        char num_buf[NUM_BUF_SIZE];
-       char *s, *q;
-       int s_len;
-       int is_negative;
+       char *s = NULL, *q;
+       int s_len = 0, is_negative = 0;
 
        PRINTF_DEBUG(("sprintf: appenddouble(%x, %x, %x, %f, %d, '%c', %d, %c)\n",
                                  *buffer, pos, size, number, width, padding, alignment, fmt));