Skip to content

Commit 2f0643d

Browse files
committed
ext/soap/php_http.c: Refactor in_domain()
1 parent 1af4b35 commit 2f0643d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/soap/php_http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ static bool in_domain(const zend_string *host, const zend_string *domain)
326326
{
327327
if (ZSTR_VAL(domain)[0] == '.') {
328328
if (ZSTR_LEN(host) > ZSTR_LEN(domain)) {
329-
return strcmp(ZSTR_VAL(host)+ZSTR_LEN(host)-ZSTR_LEN(domain), ZSTR_VAL(domain)) == 0;
329+
return zend_string_equals_cstr(domain, ZSTR_VAL(host)+ZSTR_LEN(host)-ZSTR_LEN(domain), ZSTR_LEN(domain));
330330
} else {
331-
return 0;
331+
return false;
332332
}
333333
} else {
334334
return zend_string_equals(host,domain);

0 commit comments

Comments
 (0)