[Asterisk-code-review] CLI: Refactor cli complete. (asterisk[master])
Kevin Harwell
asteriskteam at digium.com
Tue Nov 21 13:36:27 CST 2017
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/7268 )
Change subject: CLI: Refactor cli_complete.
......................................................................
Patch Set 3: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/7268/3/main/asterisk.c
File main/asterisk.c:
https://gerrit.asterisk.org/#/c/7268/3/main/asterisk.c@3175
PS3, Line 3175: while (matches[nummatches + 1]) {
: nummatches++;
: }
:
: if (ast_opt_remote && nummatches > 1) {
I might be reading this wrong, but why the "nummatches + 1"? Won't that make nummatches be one less than expected?
For instance in the second "if" check "nummatches > 1". This seems like a check for if more than two elements matched then sort and check for dupes. However given the above, nummatches (starting at 0) could be 1 here, but two elements are in "matches" (which may need to be sorted or could be dupes).
--
To view, visit https://gerrit.asterisk.org/7268
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie2211b519a3d4bec45bf46e0095bdd01d384cb69
Gerrit-Change-Number: 7268
Gerrit-PatchSet: 3
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Tue, 21 Nov 2017 19:36:27 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171121/77dab86e/attachment.html>
More information about the asterisk-code-review
mailing list