Skip to content

Commit 54dfa0c

Browse files
committed
ext/curl: make string pointers const
1 parent 9a4ca7e commit 54dfa0c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/curl/curl_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ PHP_FUNCTION(curl_file_create)
6565
}
6666
/* }}} */
6767

68-
static void curlfile_get_property(char *name, size_t name_len, INTERNAL_FUNCTION_PARAMETERS)
68+
static void curlfile_get_property(const char *name, size_t name_len, INTERNAL_FUNCTION_PARAMETERS)
6969
{
7070
zval *res, rv;
7171

@@ -74,7 +74,7 @@ static void curlfile_get_property(char *name, size_t name_len, INTERNAL_FUNCTION
7474
RETURN_COPY_DEREF(res);
7575
}
7676

77-
static void curlfile_set_property(char *name, size_t name_len, INTERNAL_FUNCTION_PARAMETERS)
77+
static void curlfile_set_property(const char *name, size_t name_len, INTERNAL_FUNCTION_PARAMETERS)
7878
{
7979
zend_string *arg;
8080

ext/curl/interface.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
20762076
struct curl_slist *slist = NULL;
20772077

20782078
if (Z_TYPE_P(zvalue) != IS_ARRAY) {
2079-
char *name = NULL;
2079+
const char *name = NULL;
20802080
switch (option) {
20812081
case CURLOPT_HTTPHEADER:
20822082
name = "CURLOPT_HTTPHEADER";

0 commit comments

Comments
 (0)