[Asterisk-code-review] stasis: Allow empty application arguments to move. (...asterisk[master])
Corey Farrell
asteriskteam at digium.com
Wed Mar 13 08:52:43 CDT 2019
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11145 )
Change subject: stasis: Allow empty application arguments to move.
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.asterisk.org/#/c/11145/1/res/stasis/control.c
File res/stasis/control.c:
https://gerrit.asterisk.org/#/c/11145/1/res/stasis/control.c@466
PS1, Line 466: move_data->app_args = move_data->app_name + strlen(app_name) + 1;
Could you move this into the `if (app_args) {}` block below? This would make the code easier to read and avoid a false positive for pointing to memory past the allocation.
You could then remove the `else { move_data->app_args = NULL; }` as the variable would still be NULL from ast_calloc. This part matters less to me though, unnecessarily NULL'ing a field that is already NULL doesn't raise a red flag.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11145
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I1e4d37415f3034abe36496dc30209c2303e6af5c
Gerrit-Change-Number: 11145
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Wed, 13 Mar 2019 13:52:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190313/6d6c6bd9/attachment.html>
More information about the asterisk-code-review
mailing list