Skip to content

Commit 2f23b11

Browse files
committed
Fully zero-initialize structs
1 parent 5a4f704 commit 2f23b11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ibase_query.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ static int _php_ibase_bind_array(zval *val, char *buf, zend_ulong buf_size, /* {
434434
break;
435435
}
436436
} else {
437-
struct tm t = { 0, 0, 0, 0, 0, 0 };
437+
struct tm t = { 0 };
438438

439439
switch (array->el_type) {
440440
#ifndef HAVE_STRPTIME
@@ -674,7 +674,8 @@ static int _php_ibase_bind(XSQLDA *sqlda, zval *b_vars, BIND_BUF *buf, /* {{{ */
674674
if (Z_STRLEN_P(b_var) != BLOB_ID_LEN ||
675675
!_php_ibase_string_to_quad(Z_STRVAL_P(b_var), &buf[i].val.qval)) {
676676

677-
ibase_blob ib_blob = { 0, BLOB_INPUT };
677+
ibase_blob ib_blob = { 0 };
678+
ib_blob.type = BLOB_INPUT;
678679

679680
if (isc_create_blob(IB_STATUS, &ib_query->link->handle,
680681
&ib_query->trans->handle, &ib_blob.bl_handle, &ib_blob.bl_qd)) {

0 commit comments

Comments
 (0)