]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_cliexec: Remove unnecessary casts to char*.
authorNaveen Albert <asterisk@phreaknet.org>
Tue, 9 Sep 2025 20:12:52 +0000 (16:12 -0400)
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Thu, 11 Sep 2025 14:19:46 +0000 (14:19 +0000)
Resolves: #1436

res/res_cliexec.c

index b1e13f94b36769050aded98d9b4d2cbc491fe4cc..6543dfde7432c5914cb03be376ff1bf877e08764 100644 (file)
@@ -49,7 +49,7 @@ static char *handle_exec(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
 {
        struct ast_channel *c = NULL;
        RAII_VAR(struct ast_format_cap *, caps, NULL, ao2_cleanup);
-       char *app_name, *app_args;
+       const char *app_name, *app_args;
        int ret = 0;
        struct ast_app *app;
 
@@ -73,8 +73,8 @@ static char *handle_exec(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
                return CLI_SHOWUSAGE;
        }
 
-       app_name = (char *) a->argv[3];
-       app_args = a->argc == e->args + 2 ? (char *) a->argv[4] : NULL;
+       app_name = a->argv[3];
+       app_args = a->argc == e->args + 2 ? a->argv[4] : NULL;
 
        if (!app_name) {
                return CLI_FAILURE;