Skip to content

Commit 883014d

Browse files
committed
Fix const-generic warning in xp_ssl.c
``` ext/openssl/xp_ssl.c:423:24: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 423 | if (!(wildcard = strchr(certname, '*')) || memchr(certname, '.', wildcard - certname)) { | ^ ``` Since these typically turn into errors with -Werror, fix the build already.
1 parent f81a9a2 commit 883014d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/xp_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static bool php_openssl_x509_fingerprint_match(X509 *peer, zval *val)
413413

414414
static bool php_openssl_matches_wildcard_name(const char *subjectname, const char *certname) /* {{{ */
415415
{
416-
char *wildcard = NULL;
416+
const char *wildcard = NULL;
417417
ptrdiff_t prefix_len;
418418
size_t suffix_len, subject_len;
419419

0 commit comments

Comments
 (0)