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/db | |
parent | a395304c7245ec411e8c735c82734e1fd0c27725 (diff) | |
download | php-git-a7b91019e9b551ff48dd91587674784b7020673f.tar.gz |
Removed pointless memory allocation checks.
Diffstat (limited to 'ext/db')
-rw-r--r-- | ext/db/db.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/db/db.c b/ext/db/db.c index 785eaebc7d..338d8dd581 100644 --- a/ext/db/db.c +++ b/ext/db/db.c @@ -198,10 +198,8 @@ PHP_FUNCTION(db_id_list) RETURN_FALSE; } - if (array_init(return_value) == FAILURE) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Unable to initialize array"); - RETURN_FALSE; - } + array_init(return_value); + numitems = zend_hash_next_free_element(&EG(regular_list)); for (i=1; i<numitems; i++) { if (zend_hash_index_find(&EG(regular_list), i, (void **) &le)==FAILURE) { @@ -395,10 +393,6 @@ dbm_info *php_dbm_open(char *filename, char *mode TSRMLS_DC) if (dbf) { info = (dbm_info *)emalloc(sizeof(dbm_info)); - if (!info) { - php_error_docref1(NULL TSRMLS_CC, filename, E_ERROR, "Problem allocating memory!"); - return NULL; - } info->filename = estrdup(filename); info->lockfn = lockfn; |