On 05/30/2014 02:37 AM, Peter Krempa wrote: > Sometimes the length of the string list is known but the array isn't > NULL terminated. Add helper to free the array in such cases. Can't this just be done with: array[count] = NULL; virStringFreeList(array); Furthermore, MOST of our allocation guarantees a NULL-terminated array (VIR_ALLOC_N for example). Where did you actually run into a situation where the tail wasn't already NULL? > --- > src/libvirt_private.syms | 1 + > src/util/virstring.c | 20 ++++++++++++++++++++ > src/util/virstring.h | 1 + > 3 files changed, 22 insertions(+) I'm not quite sold on whether we need this. The code looks clean enough, but without seeing it used in context, I'm reserving judgment until later in the series. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list