]> granicus.if.org Git - php/commitdiff
cleanup variable initializations
authorFrank M. Kromann <fmk@php.net>
Sun, 9 Feb 2003 09:39:53 +0000 (09:39 +0000)
committerFrank M. Kromann <fmk@php.net>
Sun, 9 Feb 2003 09:39:53 +0000 (09:39 +0000)
ext/mssql/php_mssql.c

index 4b7497afa07295f23bf47a35213cf1ea8a8d821b..38e30a355c131263e6f96538eb82c9647a9420ab 100644 (file)
@@ -1856,16 +1856,13 @@ PHP_FUNCTION(mssql_init)
    Adds a parameter to a stored procedure or a remote stored procedure  */
 PHP_FUNCTION(mssql_bind)
 {
-       int     type, is_output, is_null, datalen, maxlen;
+       int     type, is_output, is_null, datalen, maxlen = -1;
        zval **stmt, **param_name, **var, **yytype;
        mssql_link *mssql_ptr;
        mssql_statement *statement;
        mssql_bind bind,*bindp;
-       int id, status;
-       LPBYTE value;
-
-       id=0;
-       status=0;
+       int id = 0, status = 0;
+       LPBYTE value = NULL;
 
        /* BEGIN input validation */
        switch(ZEND_NUM_ARGS()) {
@@ -1877,8 +1874,6 @@ PHP_FUNCTION(mssql_bind)
                        type=Z_LVAL_PP(yytype);
                        is_null=FALSE;
                        is_output=FALSE;
-                       maxlen=-1;
-       
                        break;
                                                
                case 5: {
@@ -1892,7 +1887,6 @@ PHP_FUNCTION(mssql_bind)
                                type=Z_LVAL_PP(yytype);
                                is_null=FALSE;
                                is_output=Z_LVAL_PP(yyis_output);
-                               maxlen=-1;      
                        }
                        break;  
 
@@ -1908,7 +1902,6 @@ PHP_FUNCTION(mssql_bind)
                                type=Z_LVAL_PP(yytype);
                                is_output=Z_LVAL_PP(yyis_output);
                                is_null=Z_LVAL_PP(yyis_null);
-                               maxlen=-1;
                        }
                        break;