svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c trunk/ext/mysqlnd/mysqlnd_ps.c
| From: | Andrey Hristov | Date: | Tue, 01 Feb 2011 16:55:20 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c trunk/ext/mysqlnd/mysqlnd_ps.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-64486@lists.php.net to get a copy of this message | ||
andrey Tue, 01 Feb 2011 16:55:20 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307921
Log:
fix warnings. These checks are not needed because
param_no is unsigned, it wasn't in the beginning.
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
U php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c 2011-02-01 16:35:26 UTC (rev 307920)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_ps.c 2011-02-01 16:55:20 UTC (rev 307921)
@@ -1477,7 +1477,7 @@
DBG_RETURN(FAIL);
}
- if (param_no < 0 || param_no >= stmt->param_count) {
+ if (param_no >= stmt->param_count) {
SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter
number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);
@@ -1617,7 +1617,7 @@
DBG_RETURN(FAIL);
}
- if (param_no < 0 || param_no >= stmt->field_count) {
+ if (param_no >= stmt->field_count) {
SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter
number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2011-02-01 16:35:26 UTC (rev 307920)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_ps.c 2011-02-01 16:55:20 UTC (rev 307921)
@@ -1477,7 +1477,7 @@
DBG_RETURN(FAIL);
}
- if (param_no < 0 || param_no >= stmt->param_count) {
+ if (param_no >= stmt->param_count) {
SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter
number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);
@@ -1617,7 +1617,7 @@
DBG_RETURN(FAIL);
}
- if (param_no < 0 || param_no >= stmt->field_count) {
+ if (param_no >= stmt->field_count) {
SET_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, UNKNOWN_SQLSTATE, "Invalid parameter
number");
DBG_ERR("invalid param_no");
DBG_RETURN(FAIL);