mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02: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:
parent
68537fd9f4
commit
e82b3b2dd5
1 changed files with 2 additions and 2 deletions
|
@ -535,7 +535,7 @@ void php_firebird_set_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *state,
|
||||||
einfo->errmsg_length = 0;
|
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];
|
char buf[512];
|
||||||
size_t buf_size = sizeof(buf), read_len = 0;
|
size_t buf_size = sizeof(buf), read_len = 0;
|
||||||
ssize_t tmp_len;
|
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)];
|
char sqlstate[sizeof(pdo_error_type)];
|
||||||
fb_sqlstate(sqlstate, H->isc_status);
|
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);
|
strcpy(*error_code, sqlstate);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue