Skip to content

Commit da56457

Browse files
committed
cleanup variable initializations
1 parent 9c16198 commit da56457

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

ext/mssql/php_mssql.c

+3-10
Original file line numberDiff line numberDiff line change
@@ -1856,16 +1856,13 @@ PHP_FUNCTION(mssql_init)
18561856
Adds a parameter to a stored procedure or a remote stored procedure */
18571857
PHP_FUNCTION(mssql_bind)
18581858
{
1859-
int type, is_output, is_null, datalen, maxlen;
1859+
int type, is_output, is_null, datalen, maxlen = -1;
18601860
zval **stmt, **param_name, **var, **yytype;
18611861
mssql_link *mssql_ptr;
18621862
mssql_statement *statement;
18631863
mssql_bind bind,*bindp;
1864-
int id, status;
1865-
LPBYTE value;
1866-
1867-
id=0;
1868-
status=0;
1864+
int id = 0, status = 0;
1865+
LPBYTE value = NULL;
18691866

18701867
/* BEGIN input validation */
18711868
switch(ZEND_NUM_ARGS()) {
@@ -1877,8 +1874,6 @@ PHP_FUNCTION(mssql_bind)
18771874
type=Z_LVAL_PP(yytype);
18781875
is_null=FALSE;
18791876
is_output=FALSE;
1880-
maxlen=-1;
1881-
18821877
break;
18831878

18841879
case 5: {
@@ -1892,7 +1887,6 @@ PHP_FUNCTION(mssql_bind)
18921887
type=Z_LVAL_PP(yytype);
18931888
is_null=FALSE;
18941889
is_output=Z_LVAL_PP(yyis_output);
1895-
maxlen=-1;
18961890
}
18971891
break;
18981892

@@ -1908,7 +1902,6 @@ PHP_FUNCTION(mssql_bind)
19081902
type=Z_LVAL_PP(yytype);
19091903
is_output=Z_LVAL_PP(yyis_output);
19101904
is_null=Z_LVAL_PP(yyis_null);
1911-
maxlen=-1;
19121905
}
19131906
break;
19141907

0 commit comments

Comments
 (0)