[Asterisk-code-review] various files - fix some alerts raised by lgtm code analysis (asterisk[13])
George Joseph
asteriskteam at digium.com
Tue Nov 12 11:16:39 CST 2019
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13102 )
Change subject: various files - fix some alerts raised by lgtm code analysis
......................................................................
Patch Set 4: Code-Review+1
(6 comments)
https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_playback.c
File apps/app_playback.c:
https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_playback.c@178
PS3, Line 178: char *lang, *x, *rule = NULL, *rule_head = NULL;
> Multiple initializers on the same line. Don't let Richard see this.
Done
https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_voicemail.c
File apps/app_voicemail.c:
https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_voicemail.c@1878
PS3, Line 1878: char *value = NULL, *new = NULL;
> Multiple initializers on same line.
Done
https://gerrit.asterisk.org/c/asterisk/+/13102/3/apps/app_voicemail.c@1886
PS3, Line 1886: sprintf(new, "%s", newpassword);
> need spaces around +1
Done
https://gerrit.asterisk.org/c/asterisk/+/13102/3/channels/chan_motif.c
File channels/chan_motif.c:
https://gerrit.asterisk.org/c/asterisk/+/13102/3/channels/chan_motif.c@2095
PS3, Line 2095: char *id = iks_find_attrib(codec, "id"), *attr_name = iks_find_attrib(codec, "name");
> Multiple initializers.
Done
https://gerrit.asterisk.org/c/asterisk/+/13102/3/main/asterisk.c
File main/asterisk.c:
https://gerrit.asterisk.org/c/asterisk/+/13102/3/main/asterisk.c@4041
PS3, Line 4041: asterisk_daemon(isroot, runuser, rungroup);
> Is it possible that runuser and rungroup could be freed by RAII_VAR before the forked process can use it?
Nevermind. I'm an idiot. The fork copies everything.
https://gerrit.asterisk.org/c/asterisk/+/13102/3/res/res_pjsip/config_system.c
File res/res_pjsip/config_system.c:
https://gerrit.asterisk.org/c/asterisk/+/13102/3/res/res_pjsip/config_system.c@86
PS3, Line 86: sorcery
> Do we not actually use this in the function?
Oh yeah. It's a callback so it has to be there even if we don't use it.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13102
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: Id4a881686605d26c94ab5409bc70fcc21efacc25
Gerrit-Change-Number: 13102
Gerrit-PatchSet: 4
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Tue, 12 Nov 2019 17:16:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20191112/01a24fca/attachment.html>
More information about the asterisk-code-review
mailing list