From: Sterling Hughes Date: Tue, 20 Mar 2001 01:46:41 +0000 (+0000) Subject: Remove some unnecessary error checking X-Git-Tag: php-4.0.6RC1~645 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b4c5db8ae0d5d66505d3da33d4343e7a27e2070;p=php Remove some unnecessary error checking --- diff --git a/ext/curl/curl.c b/ext/curl/curl.c index efcb5a0902..76a4e304c4 100644 --- a/ext/curl/curl.c +++ b/ext/curl/curl.c @@ -291,10 +291,6 @@ PHP_FUNCTION(curl_init) } curl_handle = (php_curl *)emalloc(sizeof(php_curl)); - if (!curl_handle) { - php_error(E_WARNING, "Couldn't allocate a CURL Handle"); - RETURN_FALSE; - } memset(curl_handle, 0, sizeof(php_curl)); zend_llist_init(&curl_handle->to_free, sizeof(char *), (void(*)(void *))curl_free_string, 0); @@ -440,10 +436,6 @@ PHP_FUNCTION(curl_setopt) val_str = estrndup(Z_STRVAL_PP(current), Z_STRLEN_PP(current)); str = emalloc(strlen(string_key) + strlen(val_str) + 1 + 2); - if (!str) { - php_error(E_WARNING, "Couldn't allocate a post field from %s()", get_active_function_name()); - RETURN_FALSE; - } sprintf(str, "%s=%s", string_key, val_str); ret = curl_formparse(str, &first, &last);