[Asterisk-code-review] vector: Add AST_VECTOR_COMPACT() to reclaim wasted space (...asterisk[13])
Sean Bright
asteriskteam at digium.com
Fri Mar 15 14:26:33 CDT 2019
Sean Bright has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11150 )
Change subject: vector: Add AST_VECTOR_COMPACT() to reclaim wasted space
......................................................................
Patch Set 3:
(2 comments)
https://gerrit.asterisk.org/#/c/11150/2/include/asterisk/vector.h
File include/asterisk/vector.h:
https://gerrit.asterisk.org/#/c/11150/2/include/asterisk/vector.h@605
PS2, Line 605: typeof((vec)->elems) new_elems = ast_realloc( \
: new_max * sizeof(*new_elems));
> This is missing the "ptr" parameter.
Ack
https://gerrit.asterisk.org/#/c/11150/2/include/asterisk/vector.h@607
PS2, Line 607: if (new_elems) { \
> if the return memory is non NULL and differs from the original then the original needs to be free'd.
realloc takes care of that for you.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11150
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I9711daa0fe01783fc6f04c5710eba84f2676d7b9
Gerrit-Change-Number: 11150
Gerrit-PatchSet: 3
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Fri, 15 Mar 2019 19:26:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190315/551e6283/attachment-0001.html>
More information about the asterisk-code-review
mailing list