andrey                                   Sat, 08 Oct 2011 14:48:14 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=317906

Log:
null the value before usage

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c
    U   php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c
    U   php/php-src/trunk/ext/mysqli/mysqli_prop.c

Modified: php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c       2011-10-08 
14:22:31 UTC (rev 317905)
+++ php/php-src/branches/PHP_5_3/ext/mysqli/mysqli_prop.c       2011-10-08 
14:48:14 UTC (rev 317906)
@@ -209,14 +209,13 @@
        MY_MYSQL *mysql;

        MAKE_STD_ZVAL(*retval);
+       ZVAL_NULL(*retval);

-       CHECK_STATUS(MYSQLI_STATUS_VALID);
+       CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);

        mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;

-       if (!mysql) {
-               ZVAL_NULL(*retval);
-       } else {
+       if (mysql) {
                char * stat_msg;
 #if defined(MYSQLI_USE_MYSQLND)
                uint stat_msg_len;

Modified: php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c       2011-10-08 
14:22:31 UTC (rev 317905)
+++ php/php-src/branches/PHP_5_4/ext/mysqli/mysqli_prop.c       2011-10-08 
14:48:14 UTC (rev 317906)
@@ -257,14 +257,13 @@
        MY_MYSQL *mysql;

        MAKE_STD_ZVAL(*retval);
+       ZVAL_NULL(*retval);

-       CHECK_STATUS(MYSQLI_STATUS_VALID);
+       CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);

        mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;

-       if (!mysql) {
-               ZVAL_NULL(*retval);
-       } else {
+       if (mysql) {
                char * stat_msg;
 #if defined(MYSQLI_USE_MYSQLND)
                uint stat_msg_len;

Modified: php/php-src/trunk/ext/mysqli/mysqli_prop.c
===================================================================
--- php/php-src/trunk/ext/mysqli/mysqli_prop.c  2011-10-08 14:22:31 UTC (rev 
317905)
+++ php/php-src/trunk/ext/mysqli/mysqli_prop.c  2011-10-08 14:48:14 UTC (rev 
317906)
@@ -257,14 +257,13 @@
        MY_MYSQL *mysql;

        MAKE_STD_ZVAL(*retval);
+       ZVAL_NULL(*retval);

-       CHECK_STATUS(MYSQLI_STATUS_VALID);
+       CHECK_STATUS(MYSQLI_STATUS_INITIALIZED);

        mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr;

-       if (!mysql) {
-               ZVAL_NULL(*retval);
-       } else {
+       if (mysql) {
                char * stat_msg;
 #if defined(MYSQLI_USE_MYSQLND)
                uint stat_msg_len;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to