diff options
author | Andrey Hristov <andrey@php.net> | 2010-10-06 06:08:55 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-10-06 06:08:55 +0000 |
commit | 062ddaa700ebc1eb8895ca8f2365e5afbd67e5fe (patch) | |
tree | a5ec6f9033bc9c9c92dee614f4b9a6b99c672624 /ext/mysqlnd/mysqlnd_ps_codec.c | |
parent | 58a15c2cf5e007ddf9dd26493b39482aab809acc (diff) | |
download | php-git-062ddaa700ebc1eb8895ca8f2365e5afbd67e5fe.tar.gz |
fix shadowing of parameters
Diffstat (limited to 'ext/mysqlnd/mysqlnd_ps_codec.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps_codec.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index b95d6f00df..31aaae373a 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -231,7 +231,7 @@ void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field, { struct st_mysqlnd_time t; unsigned int length; /* First byte encodes the length*/ - char *to; + char * value; DBG_ENTER("ps_fetch_time"); if ((length = php_mysqlnd_net_field_length(row))) { @@ -262,17 +262,17 @@ void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field, QQ : How to make this unicode without copying two times the buffer - Unicode equivalent of spprintf? */ - length = spprintf(&to, 0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second); + length = spprintf(&value, 0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second); - DBG_INF_FMT("%s", to); + DBG_INF_FMT("%s", value); #if MYSQLND_UNICODE if (!as_unicode) { #endif - ZVAL_STRINGL(zv, to, length, 1); - efree(to); /* allocated by spprintf */ + ZVAL_STRINGL(zv, value, length, 1); + efree(value); /* allocated by spprintf */ #if MYSQLND_UNICODE } else { - ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); + ZVAL_UTF8_STRINGL(zv, value, length, ZSTR_AUTOFREE); } #endif DBG_VOID_RETURN; @@ -288,7 +288,7 @@ void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field, { struct st_mysqlnd_time t = {0}; unsigned int length; /* First byte encodes the length*/ - char *to; + char * value; DBG_ENTER("ps_fetch_date"); if ((length = php_mysqlnd_net_field_length(row))) { @@ -313,17 +313,17 @@ void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field, QQ : How to make this unicode without copying two times the buffer - Unicode equivalent of spprintf? */ - length = spprintf(&to, 0, "%04u-%02u-%02u", t.year, t.month, t.day); + length = spprintf(&value, 0, "%04u-%02u-%02u", t.year, t.month, t.day); - DBG_INF_FMT("%s", to); + DBG_INF_FMT("%s", value); #if MYSQLND_UNICODE if (!as_unicode) { #endif - ZVAL_STRINGL(zv, to, length, 1); - efree(to); /* allocated by spprintf */ + ZVAL_STRINGL(zv, value, length, 1); + efree(value); /* allocated by spprintf */ #if MYSQLND_UNICODE } else { - ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); + ZVAL_UTF8_STRINGL(zv, value, length, ZSTR_AUTOFREE); } #endif DBG_VOID_RETURN; @@ -339,7 +339,7 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field, { struct st_mysqlnd_time t; unsigned int length; /* First byte encodes the length*/ - char *to; + char * value; DBG_ENTER("ps_fetch_datetime"); if ((length = php_mysqlnd_net_field_length(row))) { @@ -371,15 +371,15 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field, QQ : How to make this unicode without copying two times the buffer - Unicode equivalent of spprintf? */ - length = spprintf(&to, 0, "%04u-%02u-%02u %02u:%02u:%02u", + length = spprintf(&value, 0, "%04u-%02u-%02u %02u:%02u:%02u", t.year, t.month, t.day, t.hour, t.minute, t.second); - DBG_INF_FMT("%s", to); + DBG_INF_FMT("%s", value); #if MYSQLND_UNICODE if (!as_unicode) { #endif - ZVAL_STRINGL(zv, to, length, 1); - efree(to); /* allocated by spprintf */ + ZVAL_STRINGL(zv, value, length, 1); + efree(value); /* allocated by spprintf */ #if MYSQLND_UNICODE } else { ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); |