summaryrefslogtreecommitdiff
path: root/sapi/phpdbg
diff options
context:
space:
mode:
authorcodinghuang <2812240764@qq.com>2020-11-27 20:29:59 +0800
committerNikita Popov <nikita.ppv@gmail.com>2020-12-01 10:40:26 +0100
commit3c6ab4b3ea5854fd44a2945bb65bf027a6c94890 (patch)
tree484d1f3a821f9530679a7af2c4c86f892ac3e8d1 /sapi/phpdbg
parentc034f200aa1bd0c54f68a44d82f9089e936cc79d (diff)
downloadphp-git-3c6ab4b3ea5854fd44a2945bb65bf027a6c94890.tar.gz
Add const modifier for zend_extension members
Closes GH-6462.
Diffstat (limited to 'sapi/phpdbg')
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 39ef7d8768..58a54a5a55 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -1227,7 +1227,7 @@ static void add_zendext_info(zend_extension *ext) /* {{{ */ {
/* }}} */
#ifdef HAVE_LIBDL
-PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name) /* {{{ */ {
+PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, const char **name) /* {{{ */ {
DL_HANDLE handle;
char *extension_dir;
@@ -1325,7 +1325,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
}
module_entry = get_module();
- *name = (char *) module_entry->name;
+ *name = module_entry->name;
if (strcmp(ZEND_EXTENSION_BUILD_ID, module_entry->build_id)) {
phpdbg_error("dl", "type=\"wrongbuild\" module=\"%s\" buildneeded=\"%s\" buildinstalled=\"%s\"", "%s was built with configuration %s, whereas running engine is %s", module_entry->name, module_entry->build_id, ZEND_EXTENSION_BUILD_ID);
@@ -1371,8 +1371,8 @@ quit:
PHPDBG_COMMAND(dl) /* {{{ */
{
- const char *type;
- char *name, *path;
+ const char *type, *name;
+ char *path;
if (!param || param->type == EMPTY_PARAM) {
phpdbg_notice("dl", "extensiontype=\"Zend extension\"", "Zend extensions");
@@ -1388,7 +1388,6 @@ PHPDBG_COMMAND(dl) /* {{{ */
phpdbg_activate_err_buf(1);
if ((type = phpdbg_load_module_or_extension(&path, &name)) == NULL) {
phpdbg_error("dl", "path=\"%s\" %b", "Could not load %s, not found or invalid zend extension / module: %b", path);
- efree(name);
} else {
phpdbg_notice("dl", "extensiontype=\"%s\" name=\"%s\" path=\"%s\"", "Successfully loaded the %s %s at path %s", type, name, path);
}