summaryrefslogtreecommitdiff
path: root/ext/dbx
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-01-30 02:33:16 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-01-30 02:33:16 +0000
commit453368afdffaa2017c22f75f72b736a3b3cb510a (patch)
tree9110d98320549877fbcf1d61bd1e66b550124f91 /ext/dbx
parente3672e49fc70e3d26b046d062cf3acc6dd06e54a (diff)
downloadphp-git-453368afdffaa2017c22f75f72b736a3b3cb510a.tar.gz
Removed pointless checks.
Diffstat (limited to 'ext/dbx')
-rw-r--r--ext/dbx/dbx.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/ext/dbx/dbx.c b/ext/dbx/dbx.c
index ac6665a223..43b7c5c6e1 100644
--- a/ext/dbx/dbx.c
+++ b/ext/dbx/dbx.c
@@ -302,14 +302,7 @@ ZEND_FUNCTION(dbx_connect)
RETURN_LONG(0);
}
- if (object_init(return_value) != SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "dbx: unable to create resulting object...");
- FREE_ZVAL(dbx_module);
- zval_dtor(db_name); /* to free stringvalue memory */
- FREE_ZVAL(db_name);
- FREE_ZVAL(rv_dbx_handle);
- RETURN_LONG(0);
- }
+ object_init(return_value);
zend_hash_update(Z_OBJPROP_P(return_value), "handle", 7, (void *)&(rv_dbx_handle), sizeof(zval *), NULL);
zend_hash_update(Z_OBJPROP_P(return_value), "module", 7, (void *)&(dbx_module), sizeof(zval *), NULL);
@@ -427,11 +420,8 @@ ZEND_FUNCTION(dbx_query)
* rv_result_handle holds a resource
*/
/* init return_value as object (of rows) */
- if (object_init(return_value) != SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "unable to create resulting object...");
- FREE_ZVAL(rv_result_handle);
- RETURN_LONG(0);
- }
+ object_init(return_value);
+
/* add result_handle property to return_value */
zend_hash_update(Z_OBJPROP_P(return_value), "handle", 7, (void *)&(rv_result_handle), sizeof(zval *), NULL);
/* init info property as array and add to return_value as a property */