[Asterisk-code-review] core: Resolve C++ keyword conflict in ast_variable_list_replace. (asterisk[18])
Jasper Hafkenscheid
asteriskteam at digium.com
Wed Apr 20 01:03:50 CDT 2022
Jasper Hafkenscheid has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/18409 )
Change subject: core: Resolve C++ keyword conflict in ast_variable_list_replace.
......................................................................
core: Resolve C++ keyword conflict in ast_variable_list_replace.
The new parameter for ast_variable_list_replace conflicts with the C++ keyword.
ASTERISK-30021 #close
Change-Id: I8f750b886beefe888d90f929b45992fa8cd663e5
---
M include/asterisk/config.h
M main/config.c
2 files changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/09/18409/1
diff --git a/include/asterisk/config.h b/include/asterisk/config.h
index afac229..114839e 100644
--- a/include/asterisk/config.h
+++ b/include/asterisk/config.h
@@ -972,8 +972,8 @@
*
* \param head A pointer to the current variable list head. Since the variable to be
* replaced, this pointer may be updated with the new head.
- * \param old A pointer to the existing variable to be replaced.
- * \param new A pointer to the new variable that will replace the old one.
+ * \param old A pointer to the existing variable to be replaced.
+ * \param replacement A pointer to the new variable that will replace the old one.
*
* \retval 0 if a variable was replaced in the list
* \retval -1 if no replacement occured
@@ -982,7 +982,7 @@
* \note If a variable is replaced, its memory is freed.
*/
int ast_variable_list_replace_variable(struct ast_variable **head, struct ast_variable *old,
- struct ast_variable *new);
+ struct ast_variable *replacement);
/*!
* \brief Join an ast_variable list with specified separators and quoted values
diff --git a/main/config.c b/main/config.c
index 122e7aa..82cf6bb 100644
--- a/main/config.c
+++ b/main/config.c
@@ -680,14 +680,14 @@
}
int ast_variable_list_replace_variable(struct ast_variable **head, struct ast_variable *old,
- struct ast_variable *new)
+ struct ast_variable *replacement)
{
struct ast_variable *v, **prev = head;
for (v = *head; v; prev = &v->next, v = v->next) {
if (v == old) {
- new->next = v->next;
- *prev = new;
+ replacement->next = v->next;
+ *prev = replacement;
ast_free(v);
return 0;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18409
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: I8f750b886beefe888d90f929b45992fa8cd663e5
Gerrit-Change-Number: 18409
Gerrit-PatchSet: 1
Gerrit-Owner: Jasper Hafkenscheid <jasper.hafkenscheid at wearespindle.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220420/9df6348b/attachment.html>
More information about the asterisk-code-review
mailing list