Skip to content

Commit b71951b

Browse files
committed
ext/soap: Use bool as return type instead of int for do_request()
1 parent cfc48bd commit b71951b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/soap/soap.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,9 +2182,9 @@ PHP_METHOD(SoapClient, __construct)
21822182
}
21832183
/* }}} */
21842184

2185-
static int do_request(zval *this_ptr, xmlDoc *request, const char *location, const char *action, int version, bool one_way, zval *response) /* {{{ */
2185+
static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, const char *action, int version, bool one_way, zval *response) /* {{{ */
21862186
{
2187-
int ret = TRUE;
2187+
bool ret = true;
21882188
char *buf;
21892189
int buf_size;
21902190
zval func;
@@ -2196,7 +2196,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, const char *location, con
21962196
xmlDocDumpMemory(request, (xmlChar**)&buf, &buf_size);
21972197
if (!buf) {
21982198
add_soap_fault(this_ptr, "HTTP", "Error build soap request", NULL, NULL);
2199-
return FALSE;
2199+
return false;
22002200
}
22012201

22022202
zend_try {
@@ -2219,14 +2219,14 @@ static int do_request(zval *this_ptr, xmlDoc *request, const char *location, con
22192219

22202220
if (call_user_function(NULL, this_ptr, &func, response, 5, params) != SUCCESS) {
22212221
add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL);
2222-
ret = FALSE;
2222+
ret = false;
22232223
} else if (Z_TYPE_P(response) != IS_STRING) {
22242224
if (EG(exception) && instanceof_function(EG(exception)->ce, zend_ce_error)) {
22252225
/* Programmer error in __doRequest() implementation, let it bubble up. */
22262226
} else if (Z_TYPE_P(Z_CLIENT_SOAP_FAULT_P(this_ptr)) != IS_OBJECT) {
22272227
add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() returned non string value", NULL, NULL);
22282228
}
2229-
ret = FALSE;
2229+
ret = false;
22302230
} else if (Z_TYPE_P(trace) == IS_TRUE) {
22312231
zval_ptr_dtor(Z_CLIENT_LAST_RESPONSE_P(this_ptr));
22322232
ZVAL_STR_COPY(Z_CLIENT_LAST_RESPONSE_P(this_ptr), Z_STR_P(response));
@@ -2243,7 +2243,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, const char *location, con
22432243
zend_bailout();
22442244
}
22452245
if (ret && Z_TYPE_P(Z_CLIENT_SOAP_FAULT_P(this_ptr)) == IS_OBJECT) {
2246-
ret = FALSE;
2246+
ret = false;
22472247
}
22482248
return ret;
22492249
}
@@ -2267,7 +2267,7 @@ static void do_soap_call(zend_execute_data *execute_data,
22672267
sdlPtr old_sdl = NULL;
22682268
sdlFunctionPtr fn;
22692269
xmlDocPtr request = NULL;
2270-
int ret = FALSE;
2270+
bool ret = false;
22712271
int soap_version;
22722272
zval response;
22732273
xmlCharEncodingHandlerPtr old_encoding;

0 commit comments

Comments
 (0)