@@ -197,9 +197,9 @@ static inline int oauth_provider_set_param_value(HashTable *ht, char *key, zval
197197 Z_TRY_ADDREF_P (val );
198198 if (zend_hash_str_update (ht , key , strlen (key ), val ) == NULL ) {
199199 Z_TRY_DELREF_P (val );
200- return FAILURE ;
200+ return 0 ;
201201 }
202- return SUCCESS ;
202+ return 1 ;
203203}
204204/* }}} */
205205
@@ -214,7 +214,7 @@ static int oauth_provider_parse_auth_header(php_oauth_provider *sop, char *auth_
214214#endif
215215 size_t decoded_len ;
216216
217- if (!auth_header || strlen ( auth_header ) < 6 || strncasecmp (auth_header , "oauth " , 6 ) || !sop ) {
217+ if (!auth_header || strncasecmp (auth_header , "oauth " , 6 ) || !sop ) {
218218 zend_string_release (regex );
219219 return FAILURE ;
220220 }
@@ -290,7 +290,7 @@ static int oauth_provider_parse_auth_header(php_oauth_provider *sop, char *auth_
290290 ZVAL_STRINGL (& decoded_val , tmp , decoded_len );
291291 efree (tmp );
292292
293- if (oauth_provider_set_param_value (sop -> oauth_params , Z_STRVAL_P (current_param ), & decoded_val )== FAILURE ) {
293+ if (! oauth_provider_set_param_value (sop -> oauth_params , Z_STRVAL_P (current_param ), & decoded_val )) {
294294 zval_ptr_dtor (& decoded_val );
295295 zval_ptr_dtor (& return_value );
296296 zval_ptr_dtor (& subpats );
@@ -609,7 +609,7 @@ SOP_METHOD(__construct)
609609 do {
610610 if (zend_hash_get_current_key_ex (Z_ARRVAL_P (params ), & key , & num_key , & hpos ) == HASH_KEY_IS_STRING ) {
611611 if ((item_param = zend_hash_get_current_data_ex (Z_ARRVAL_P (params ), & hpos )) != NULL ) {
612- if (oauth_provider_set_param_value (sop -> oauth_params , ZSTR_VAL (key ), item_param ) == FAILURE ) {
612+ if (! oauth_provider_set_param_value (sop -> oauth_params , ZSTR_VAL (key ), item_param )) {
613613 return ;
614614 }
615615 }
0 commit comments