[Asterisk-code-review] vector: Add REMOVE, SORT, INSERT SORTED and RESET macros (asterisk[13])

George Joseph asteriskteam at digium.com
Sun May 10 12:15:21 CDT 2015


George Joseph has posted comments on this change.

Change subject: vector:  Add REMOVE, SORT, INSERT_SORTED and RESET macros
......................................................................


Patch Set 3:

(3 comments)

https://gerrit.asterisk.org/#/c/421/3/include/asterisk/vector.h
File include/asterisk/vector.h:

Line 472: #define AST_VECTOR_RESET(vec, cleanup) ({ \
> This feels like it's mostly a duplicate of AST_VECTOR_CALLBACK_VOID.  Perso
This was a specific request.


https://gerrit.asterisk.org/#/c/421/3/tests/test_vector.c
File tests/test_vector.c:

Line 218: 	return (*ia > *ib) - (*ia < *ib);
> Subtracting two conditionals does not make sense to me.  Much clearer:
That won't work because the difference between 2 signed INTs could be greater than MAX_INT.


Line 234: 		info->name = "basic integer";
> I know this is existing, test name's should not have spaces.  It's impossib
Sorry, I thought I fixed these.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I41d32dbdf7137e0557134efeff9f9f1064b58d14
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Y Ateya <y.ateya at starkbits.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list