[Asterisk-code-review] vector: After remove element recheck index (asterisk[13])

Corey Farrell asteriskteam at digium.com
Mon Oct 10 22:37:24 CDT 2016


Corey Farrell has posted comments on this change.

Change subject: vector: After remove element recheck index
......................................................................


Patch Set 5: Code-Review-1

(4 comments)

https://gerrit.asterisk.org/#/c/4067/5/include/asterisk/vector.h
File include/asterisk/vector.h:

Line 370: 	for (idx = 0; (vec)->current > 0 && idx < (vec)->current; ) {	\
You don't need to check (vec)->current > 0, the existing check already verified this.


Line 397: 	for (idx = 0; (vec)->current > 0 && idx < (vec)->current; ++idx) {			\
Same


Line 422: 	for (idx = 0; (vec)->current > 0 && idx < (vec)->current; ) {	\
Same


Line 449: 	for (idx = 0; (vec)->current > 0 && idx < (vec)->current; ++idx) {			\
Same


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib947fa94dc91dcd9341f357f1084782c64434eb7
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Badalian Vyacheslav <v.badalyan at open-bs.ru>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Badalian Vyacheslav <v.badalyan at open-bs.ru>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list