diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-18 19:41:56 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-18 19:41:56 +0000 |
commit | e2868b57885dac8a36593e2154c808038adc4cef (patch) | |
tree | edb1421b5b3d4340a0e2538b996393874575b5f6 /ext/mssql/php_mssql.c | |
parent | 72b356c1bccb511e9a3414cbfe6ff25b5a20b91f (diff) | |
download | php-git-e2868b57885dac8a36593e2154c808038adc4cef.tar.gz |
Removed pointless memory allocation checks.
Diffstat (limited to 'ext/mssql/php_mssql.c')
-rw-r--r-- | ext/mssql/php_mssql.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index fa244f0c16..72b639b50c 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -1280,9 +1280,7 @@ static void php_mssql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type) RETURN_FALSE; } - if (array_init(return_value)==FAILURE) { - RETURN_FALSE; - } + array_init(return_value); for (i=0; i<result->num_fields; i++) { if (Z_TYPE(result->data[result->cur_row][i]) != IS_NULL) { @@ -1838,15 +1836,8 @@ PHP_FUNCTION(mssql_init) statement=NULL; statement = ecalloc(1,sizeof(mssql_statement)); - - if (statement!=NULL) { - statement->link = mssql_ptr; - statement->executed=FALSE; - } - else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to allocate statement"); - RETURN_FALSE; - } + statement->link = mssql_ptr; + statement->executed=FALSE; statement->id = zend_list_insert(statement,le_statement); |