]> granicus.if.org Git - php/commitdiff
fix warnings. These checks are not needed because
authorAndrey Hristov <andrey@php.net>
Tue, 1 Feb 2011 16:55:20 +0000 (16:55 +0000)
committerAndrey Hristov <andrey@php.net>
Tue, 1 Feb 2011 16:55:20 +0000 (16:55 +0000)
param_no is unsigned, it wasn't in the beginning.

ext/mysqlnd/mysqlnd_ps.c

index defd648dd938f18b87a1ae530c85b30069173aa2..5f4580927a3a878a195ca13c6daa4b5084aea75f 100644 (file)
@@ -1477,7 +1477,7 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const s, unsigne
                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 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const s, unsigned i
                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);