commit | b8c2c1fa35f240ea8eee719c0f5a657285864573 | [log] [tgz] |
---|---|---|
author | Michael Haggerty <mhagger@alum.mit.edu> | Sun Nov 04 07:46:51 2012 +0100 |
committer | Jeff King <peff@peff.net> | Sun Nov 04 06:46:55 2012 -0500 |
tree | bdc22ab0485418b9ef905a580ef2543e92081d6d | |
parent | 9c50374497d5a3259907e32455f228cfbda85ddf [diff] |
strbuf_split_buf(): use ALLOC_GROW() Use ALLOC_GROW() rather than inline code to manage memory in strbuf_split_buf(). Rename "pos" to "nr" because it better describes the use of the variable and it better conforms to the "ALLOC_GROW" idiom. Also, instead of adding a sentinal NULL value after each entry is added to the list, only add it once after all of the entries have been added. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Jeff King <peff@peff.net>