]> granicus.if.org Git - php/commitdiff
- Initialize variable
authorFelipe Pena <felipe@php.net>
Sun, 5 Oct 2008 04:36:18 +0000 (04:36 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 5 Oct 2008 04:36:18 +0000 (04:36 +0000)
ext/msql/php_msql.c

index df8b07e1e50f4a54f4cf2627dc64c8fa42947cac..8d56c92d31d25890df51e0f82223fd30c3cc1f26 100644 (file)
@@ -689,7 +689,7 @@ PHP_FUNCTION(msql_query)
 {
        zval *msql_link = NULL;
        char *query;
-       int id, msql, query_len, af_rows;
+       int id = -1, msql, query_len, af_rows;
        
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|r", &query, &query_len, &msql_link) == FAILURE) {
                return;
@@ -697,10 +697,6 @@ PHP_FUNCTION(msql_query)
        
        if (ZEND_NUM_ARGS() == 1) {
                id = msql_globals.default_link;
-               
-               if (id == -1) {
-                       RETURN_FALSE;
-               }
        }
        
        ZEND_FETCH_RESOURCE2(msql, int, &msql_link, id, "mSQL-Link", msql_globals.le_link, msql_globals.le_plink);