popts.input.str = ct->val;
popts.input.len = ct->len;
- if (php_http_params_parse(¶ms, &popts)) {
+ if (EXPECTED(php_http_params_parse(¶ms, &popts))) {
zval *cur, *arg;
zend_string *ct_str;
zend_ulong index;
zend_hash_internal_pointer_reset(¶ms);
- if ((cur = zend_hash_get_current_data(¶ms))
+ if (EXPECTED((cur = zend_hash_get_current_data(¶ms))
&& (Z_TYPE_P(cur) == IS_ARRAY)
- && (HASH_KEY_IS_STRING == zend_hash_get_current_key(¶ms, &ct_str, &index))
+ && (HASH_KEY_IS_STRING == zend_hash_get_current_key(¶ms, &ct_str, &index)))
) {
if (php_http_match(ct_str->val, "multipart", PHP_HTTP_MATCH_WORD)) {
is_multipart = 1;
/* get boundary */
- if (boundary
+ if (EXPECTED(boundary
&& (arg = zend_hash_str_find(Z_ARRVAL_P(cur), ZEND_STRL("arguments")))
- && Z_TYPE_P(arg) == IS_ARRAY
+ && Z_TYPE_P(arg) == IS_ARRAY)
) {
zval *val;
php_http_arrkey_t key;
if (key.key && key.key->len == lenof("boundary") && !strcasecmp(key.key->val, "boundary")) {
zend_string *bnd = zval_get_string(val);
- if (bnd->len) {
+ if (EXPECTED(bnd->len)) {
*boundary = estrndup(bnd->val, bnd->len);
}
zend_string_release(bnd);
void php_http_message_dtor(php_http_message_t *message)
{
- if (message) {
+ if (EXPECTED(message)) {
zend_hash_destroy(&message->hdrs);
php_http_message_body_free(&message->body);
void php_http_message_free(php_http_message_t **message)
{
- if (*message) {
+ if (EXPECTED(*message)) {
if ((*message)->parent) {
php_http_message_free(&(*message)->parent);
}
zend_object *php_http_message_object_clone(zval *this_ptr)
{
- php_http_message_object_t *new_obj = NULL;
+ php_http_message_object_t *new_obj;
php_http_message_object_t *old_obj = PHP_HTTP_OBJ(NULL, this_ptr);
new_obj = php_http_message_object_new_ex(old_obj->zo.ce, php_http_message_copy(old_obj->message, NULL));