summaryrefslogtreecommitdiff
path: root/src/sp_cookie_encryption.c
diff options
context:
space:
mode:
authorChristian Göttsche2024-05-29 20:38:23 +0200
committerjvoisin2024-06-06 16:27:35 +0200
commitf40955e03cd361966f927acfaa477cfceb8930e5 (patch)
treebe4213dd027ea2a8f0784068c5c84e2b5fd837ef /src/sp_cookie_encryption.c
parentd82ab8d20191a9ebdb83f918c62fc6c32f068b01 (diff)
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.
Diffstat (limited to 'src/sp_cookie_encryption.c')
-rw-r--r--src/sp_cookie_encryption.c2
1 files changed, 1 insertions, 1 deletions
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) {
98 zval *expires_or_options = NULL; 98 zval *expires_or_options = NULL;
99 zend_bool secure = 0, httponly = 0; 99 zend_bool secure = 0, httponly = 0;
100 const sp_cookie *cookie_node = NULL; 100 const sp_cookie *cookie_node = NULL;
101 char *cookie_samesite; 101 const char *cookie_samesite;
102 102
103 // LCOV_EXCL_BR_START 103 // LCOV_EXCL_BR_START
104 ZEND_PARSE_PARAMETERS_START(1, 7) 104 ZEND_PARSE_PARAMETERS_START(1, 7)