diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-18 19:49:28 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-18 19:49:28 +0000 |
commit | a7b91019e9b551ff48dd91587674784b7020673f (patch) | |
tree | cfa8e9cb23f2e0a71364f747f2e3debcb508a5f5 /ext/dbx/dbx.c | |
parent | a395304c7245ec411e8c735c82734e1fd0c27725 (diff) | |
download | php-git-a7b91019e9b551ff48dd91587674784b7020673f.tar.gz |
Removed pointless memory allocation checks.
Diffstat (limited to 'ext/dbx/dbx.c')
-rw-r--r-- | ext/dbx/dbx.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/ext/dbx/dbx.c b/ext/dbx/dbx.c index 9c6fa208a8..fc780a0b9c 100644 --- a/ext/dbx/dbx.c +++ b/ext/dbx/dbx.c @@ -437,20 +437,12 @@ ZEND_FUNCTION(dbx_query) /* init info property as array and add to return_value as a property */ if (result_flags & DBX_RESULT_INFO) { MAKE_STD_ZVAL(info); - if (array_init(info) != SUCCESS) { - zend_error(E_ERROR, "dbx_query: unable to create info-array for results..."); - FREE_ZVAL(info); - RETURN_LONG(0); - } + array_init(info); zend_hash_update(Z_OBJPROP_P(return_value), "info", 5, (void *)&(info), sizeof(zval *), NULL); } /* init data property as array and add to return_value as a property */ MAKE_STD_ZVAL(data); - if (array_init(data) != SUCCESS) { - zend_error(E_ERROR, "dbx_query: unable to create data-array for results..."); - FREE_ZVAL(data); - RETURN_LONG(0); - } + array_init(data); zend_hash_update(Z_OBJPROP_P(return_value), "data", 5, (void *)&(data), sizeof(zval *), NULL); /* get columncount and add to returnvalue as property */ MAKE_STD_ZVAL(rv_column_count); @@ -468,18 +460,8 @@ ZEND_FUNCTION(dbx_query) zval *info_row_type; MAKE_STD_ZVAL(info_row_name); MAKE_STD_ZVAL(info_row_type); - if (array_init(info_row_name) != SUCCESS) { - zend_error(E_ERROR, "dbx_query: unable to create info_row_name-array for results..."); - FREE_ZVAL(info_row_name); - FREE_ZVAL(info_row_type); - RETURN_LONG(0); - } - if (array_init(info_row_type) != SUCCESS) { - zend_error(E_ERROR, "dbx_query: unable to create info_row_type-array for results..."); - FREE_ZVAL(info_row_name); - FREE_ZVAL(info_row_type); - RETURN_LONG(0); - } + array_init(info_row_name); + array_init(info_row_type); for (col_index=0; col_index<Z_LVAL_P(rv_column_count); ++col_index) { zval *rv_column_name; zval *rv_column_type; |