]> granicus.if.org Git - php/commitdiff
initialize optional variables
authorAntony Dovgal <tony2001@php.net>
Mon, 16 Oct 2006 19:27:00 +0000 (19:27 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 16 Oct 2006 19:27:00 +0000 (19:27 +0000)
ext/standard/head.c

index 2c273bc257ab029a2e100a51f8f0544252721053..39c7efc3ad9f6f9c1a355b991afed03d93e4255d 100644 (file)
@@ -151,7 +151,7 @@ PHP_FUNCTION(setcookie)
        char *name, *value = NULL, *path = NULL, *domain = NULL;
        long expires = 0;
        zend_bool secure = 0, httponly = 0;
-       int name_len, value_len, path_len, domain_len;
+       int name_len, value_len = 0, path_len = 0, domain_len = 0;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|slssbb", &name,
                                                          &name_len, &value, &value_len, &expires, &path,
@@ -174,7 +174,7 @@ PHP_FUNCTION(setrawcookie)
        char *name, *value = NULL, *path = NULL, *domain = NULL;
        long expires = 0;
        zend_bool secure = 0, httponly = 0;
-       int name_len, value_len, path_len, domain_len;
+       int name_len, value_len = 0, path_len = 0, domain_len = 0;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|slssbb", &name,
                                                          &name_len, &value, &value_len, &expires, &path,