mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Remove non-sensical checks from firebird (#16114)
These conditions are always true because they are arrays that are address-taken, i.e. their addresses will never be NULL.
This commit is contained in:
@@ -535,7 +535,7 @@ void php_firebird_set_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *state,
|
||||
einfo->errmsg_length = 0;
|
||||
}
|
||||
|
||||
if (H->isc_status && (H->isc_status[0] == 1 && H->isc_status[1] > 0)) {
|
||||
if (H->isc_status[0] == 1 && H->isc_status[1] > 0) {
|
||||
char buf[512];
|
||||
size_t buf_size = sizeof(buf), read_len = 0;
|
||||
ssize_t tmp_len;
|
||||
@@ -557,7 +557,7 @@ void php_firebird_set_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *state,
|
||||
|
||||
char sqlstate[sizeof(pdo_error_type)];
|
||||
fb_sqlstate(sqlstate, H->isc_status);
|
||||
if (sqlstate != NULL && strlen(sqlstate) < sizeof(pdo_error_type)) {
|
||||
if (strlen(sqlstate) < sizeof(pdo_error_type)) {
|
||||
strcpy(*error_code, sqlstate);
|
||||
goto end;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user