[Asterisk-code-review] realtime: Centralize some common realtime backend code (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Feb 21 09:25:32 CST 2017


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

Change subject: realtime: Centralize some common realtime backend code
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

Minor nits

https://gerrit.asterisk.org/#/c/5045/1/addons/res_config_mysql.c
File addons/res_config_mysql.c:

Line 528: 			if (!(cat = ast_category_new_anonymous())) {
It is best to not put assignments in if tests.  Bugs have actually been caused that way.  Also with long assignment statements you have better line break options.

cat = ast_category_new_anonymous();
if (!cat) {
}


Line 529: 				ast_log(LOG_ERROR, "Out of memory allocating new category\n");
All of these out-of-memory messages are redundant.  The Asterisk allocation routines have already complained about out-of-memory.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3a1fd91e0c807dea1ce3b643b0a6fe5be9002897
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list