ext/soap: Use bool instead of int

This commit is contained in:
Gina Peter Banyard 2024-10-16 15:23:34 +01:00
parent 5e7c876282
commit cfe2e1130e

View file

@ -294,7 +294,7 @@ void sdl_restore_uri_credentials(sdlCtx *ctx)
#define SAFE_STR(a) ((a)?((const char *)a):"") #define SAFE_STR(a) ((a)?((const char *)a):"")
static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include) static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, bool include)
{ {
sdlPtr tmpsdl = ctx->sdl; sdlPtr tmpsdl = ctx->sdl;
xmlDocPtr wsdl; xmlDocPtr wsdl;
@ -363,7 +363,7 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include)
xmlAttrPtr tmp = get_attribute(trav->properties, "location"); xmlAttrPtr tmp = get_attribute(trav->properties, "location");
if (tmp) { if (tmp) {
xmlChar *uri = schema_location_construct_uri(tmp); xmlChar *uri = schema_location_construct_uri(tmp);
load_wsdl_ex(this_ptr, (char*)uri, ctx, 1); load_wsdl_ex(this_ptr, (char*)uri, ctx, true);
xmlFree(uri); xmlFree(uri);
} }
@ -556,7 +556,7 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
zend_hash_init(&ht, 0, NULL, delete_parameter, 0); zend_hash_init(&ht, 0, NULL, delete_parameter, 0);
while (*parts) { while (*parts) {
sdlParamPtr param; sdlParamPtr param;
int found = 0; bool found = false;
char *end; char *end;
while (*parts == ' ') ++parts; while (*parts == ' ') ++parts;
@ -571,7 +571,7 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
*x_param = *param; *x_param = *param;
param->paramName = NULL; param->paramName = NULL;
zend_hash_next_index_insert_ptr(&ht, x_param); zend_hash_next_index_insert_ptr(&ht, x_param);
found = 1; found = true;
break; break;
} }
} ZEND_HASH_FOREACH_END(); } ZEND_HASH_FOREACH_END();
@ -708,7 +708,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
zend_hash_init(&ctx.services, 0, NULL, NULL, 0); zend_hash_init(&ctx.services, 0, NULL, NULL, 0);
zend_try { zend_try {
load_wsdl_ex(this_ptr, struri, &ctx, 0); load_wsdl_ex(this_ptr, struri, &ctx, false);
schema_pass2(&ctx); schema_pass2(&ctx);
uint32_t n = zend_hash_num_elements(&ctx.services); uint32_t n = zend_hash_num_elements(&ctx.services);
@ -717,7 +717,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
for (uint32_t i = 0; i < n; i++) { for (uint32_t i = 0; i < n; i++) {
xmlNodePtr service, tmp; xmlNodePtr service, tmp;
xmlNodePtr trav, port; xmlNodePtr trav, port;
int has_soap_port = 0; bool has_soap_port = false;
service = tmp = zend_hash_get_current_data_ptr(&ctx.services); service = tmp = zend_hash_get_current_data_ptr(&ctx.services);
@ -787,7 +787,7 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri)
soap_error0(E_ERROR, "Parsing WSDL: No address associated with <port>"); soap_error0(E_ERROR, "Parsing WSDL: No address associated with <port>");
} }
} }
has_soap_port = 1; has_soap_port = true;
location = get_attribute(address->properties, "location"); location = get_attribute(address->properties, "location");
if (!location) { if (!location) {