[Asterisk-code-review] main: Slight refactor for in main. Improve color situation. (asterisk[11])

Corey Farrell asteriskteam at digium.com
Mon Nov 23 18:07:28 CST 2015


Corey Farrell has posted comments on this change.

Change subject: main: Slight refactor for in main. Improve color situation.
......................................................................


Patch Set 1:

(2 comments)

I leave it up to you if you want to address my comment or not.

Although I'm not sure how it's related to the color bug, I do like that you've started to split main().

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

Line 3052: 	if (getenv("HOME")) {
Everything in this function could be scoped inside 'if (getenv("HOME"))'.  Will make the flow clearer for people reading this code.

Also is the check good enough, or does it need to be !ast_strlen_zero(getenv("HOME"))?  Running 'unset HOME' would cause a NULL return from getenv, where 'HOME=' would return a non-null blank string.


Line 3063: 	if (getenv("HOME")) {
Same as ast_el_read_default_histfile


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list