summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_ps.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-10-07 13:49:00 +0000
committerAndrey Hristov <andrey@php.net>2010-10-07 13:49:00 +0000
commit2d2d6f84baa33433b42e1dce9c9e53960b048970 (patch)
tree5113d75c059ee1986f741bb4579d203d99f59bbd /ext/mysqlnd/mysqlnd_ps.c
parenta4252ab2be8a0231477396fd475397b23a089d0e (diff)
downloadphp-git-2d2d6f84baa33433b42e1dce9c9e53960b048970.tar.gz
fix some uninitialized variables. also fix shadowing of global symbols
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps.c')
-rw-r--r--ext/mysqlnd/mysqlnd_ps.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index cecce5ec43..cedf750711 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -2125,7 +2125,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_boo
MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
MYSQLND * conn;
zend_uchar cmd_buf[STMT_ID_LENGTH /* statement id */];
- enum_mysqlnd_collected_stats stat = STAT_LAST;
+ enum_mysqlnd_collected_stats statistic = STAT_LAST;
DBG_ENTER("mysqlnd_stmt::net_close");
if (!stmt || !stmt->conn) {
@@ -2176,16 +2176,16 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_boo
}
switch (stmt->execute_count) {
case 0:
- stat = STAT_PS_PREPARED_NEVER_EXECUTED;
+ statistic = STAT_PS_PREPARED_NEVER_EXECUTED;
break;
case 1:
- stat = STAT_PS_PREPARED_ONCE_USED;
+ statistic = STAT_PS_PREPARED_ONCE_USED;
break;
default:
break;
}
- if (stat != STAT_LAST) {
- MYSQLND_INC_CONN_STATISTIC(conn->stats, stat);
+ if (statistic != STAT_LAST) {
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic);
}
if (stmt->execute_cmd_buffer.buffer) {
@@ -2209,7 +2209,7 @@ static enum_func_status
MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, zend_bool implicit TSRMLS_DC)
{
MYSQLND_STMT_DATA * stmt = s? s->data:NULL;
- enum_func_status ret;
+ enum_func_status ret = FAIL;
zend_bool persistent = s->persistent;
DBG_ENTER("mysqlnd_stmt::dtor");