[Asterisk-code-review] stasis: Remove silly usage of RAII VAR. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Jan 10 15:50:09 CST 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7902 )

Change subject: stasis: Remove silly usage of RAII_VAR.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/7902/1/main/stasis.c
File main/stasis.c:

https://gerrit.asterisk.org/#/c/7902/1/main/stasis.c@715
PS1, Line 715: 	idx = AST_VECTOR_REMOVE_ELEM_UNORDERED(&topic->subscribers, sub,
This has a type inconsistency.

AST_VECTOR_REMOVE_ELEM_UNORDERED() returns 0 or -1 int.
idx is size_t which is unsigned.
Function returns int.

Probably should declare an "int res" to avoid any future stupid compiler warnings.


https://gerrit.asterisk.org/#/c/7902/1/main/stasis.c@1640
PS1, Line 1640: 		if (aco_set_defaults(&declined_option, "declined_message_types", default_cfg->declined_message_types)) {
              : 			ast_log(LOG_ERROR, "Failed to load stasis.conf and failed to initialize defaults.\n");
              : 			return -1;
              : 		}
default_cfg leaked here.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib11193531e797bcb16bba560a408eab155f706d1
Gerrit-Change-Number: 7902
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 10 Jan 2018 21:50:09 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180110/0ee2e187/attachment.html>


More information about the asterisk-code-review mailing list