Skip to content

Commit 51e2a3a

Browse files
InterLinked1gtjoseph
authored andcommitted
pbx_variables: Use const char if possible.
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
1 parent bc6061b commit 51e2a3a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/asterisk/pbx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,7 @@ void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead
14321432
/*!
14331433
* \brief Substitutes variables, similar to pbx_substitute_variables_helper_full, but allows passing the context, extension, and priority in.
14341434
*/
1435-
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);
1435+
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);
14361436
/*! @} */
14371437

14381438
/*! @name Substitution routines, using dynamic string buffers

main/pbx_variables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ void pbx_substitute_variables_helper_full(struct ast_channel *c, struct varshead
662662
pbx_substitute_variables_helper_full_location(c, headp, cp1, cp2, count, used, NULL, NULL, 0);
663663
}
664664

665-
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)
665+
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)
666666
{
667667
/* Substitutes variables into cp2, based on string cp1, cp2 NO LONGER NEEDS TO BE ZEROED OUT!!!! */
668668
const char *whereweare;

0 commit comments

Comments
 (0)