]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
pbx_variables: Use const char if possible.
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 3 Sep 2022 23:19:15 +0000 (23:19 +0000)
committerGeorge Joseph <gjoseph@digium.com>
Sun, 11 Sep 2022 13:33:06 +0000 (08:33 -0500)
Use const char for char arguments to
pbx_substitute_variables_helper_full_location
that can do so (context and exten).

ASTERISK-30209 #close

Change-Id: I001357177e9c3dca2b2b4eebc5650c1095b3da6f

include/asterisk/pbx.h
main/pbx_variables.c

index 9cc7f0b538db9a4a0a016873cb1200a34cb67b99..593b1861dcaf09464c25241a5704089793bbe8bb 100644 (file)
@@ -1432,7 +1432,7 @@ void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead
 /*!
  * \brief Substitutes variables, similar to pbx_substitute_variables_helper_full, but allows passing the context, extension, and priority in.
  */
-void pbx_substitute_variables_helper_full_location(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int cp2_size, size_t *used, char *context, char *exten, int pri);
+void pbx_substitute_variables_helper_full_location(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int cp2_size, size_t *used, const char *context, const char *exten, int pri);
 /*! @} */
 
 /*! @name Substitution routines, using dynamic string buffers
index f589b6bce0c9c120dd2aaf374e6e01d15c0bcf5e..b05a9d11ca86da65d91272d9b71c7656d5ba51b5 100644 (file)
@@ -662,7 +662,7 @@ void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead
        pbx_substitute_variables_helper_full_location(c, headp, cp1, cp2, count, used, NULL, NULL, 0);
 }
 
-void pbx_substitute_variables_helper_full_location(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count, size_t *used, char *context, char *exten, int pri)
+void pbx_substitute_variables_helper_full_location(struct ast_channel *c, struct varshead *headp, const char *cp1, char *cp2, int count, size_t *used, const char *context, const char *exten, int pri)
 {
        /* Substitutes variables into cp2, based on string cp1, cp2 NO LONGER NEEDS TO BE ZEROED OUT!!!!  */
        const char *whereweare;