[asterisk-commits] Remove const cast from leaf functions. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 4 06:42:31 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: Remove const cast from leaf functions.
......................................................................


Remove const cast from leaf functions.

app_control_register_rule and app_control_unregister_rule lock/unlock
the queue, which is a mutating operation according to the
ao2_lock/_unlock prototype. Depending on the specific (implicit) casts
in SCOPED_LOCK and RAII_VAR, the compiler may warn or not. As the only
callers of those functions do not have the const, get consistent results
by just dropping it.

Change-Id: Ib9e6296155a39bc5d627142a3828180c3cfe8fbb
---
M res/stasis/control.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/res/stasis/control.c b/res/stasis/control.c
index 0f8b540..a61e961 100644
--- a/res/stasis/control.c
+++ b/res/stasis/control.c
@@ -135,7 +135,7 @@
 }
 
 static void app_control_register_rule(
-	const struct stasis_app_control *control,
+	struct stasis_app_control *control,
 	struct app_control_rules *list, struct stasis_app_control_rule *obj)
 {
 	SCOPED_AO2LOCK(lock, control->command_queue);
@@ -143,7 +143,7 @@
 }
 
 static void app_control_unregister_rule(
-	const struct stasis_app_control *control,
+	struct stasis_app_control *control,
 	struct app_control_rules *list, struct stasis_app_control_rule *obj)
 {
 	struct stasis_app_control_rule *rule;

-- 
To view, visit https://gerrit.asterisk.org/564
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9e6296155a39bc5d627142a3828180c3cfe8fbb
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joerg Sonnenberger <joerg at bec.de>
Gerrit-Reviewer: Joerg Sonnenberger <joerg at bec.de>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list