From f40955e03cd361966f927acfaa477cfceb8930e5 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Wed, 29 May 2024 20:38:23 +0200 Subject: Avoid dropping const qualifier in casts Adjusts casts to void dropping const qualifiers. This helps to avoid mistakes, e.g. modifying string literals. Also use size_t for length, similar to the upstream php interfaces. --- src/sp_cookie_encryption.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp_cookie_encryption.c') diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c index b2cff66..8b24a9c 100644 --- a/src/sp_cookie_encryption.c +++ b/src/sp_cookie_encryption.c @@ -98,7 +98,7 @@ PHP_FUNCTION(sp_setcookie) { zval *expires_or_options = NULL; zend_bool secure = 0, httponly = 0; const sp_cookie *cookie_node = NULL; - char *cookie_samesite; + const char *cookie_samesite; // LCOV_EXCL_BR_START ZEND_PARSE_PARAMETERS_START(1, 7) -- cgit v1.3