]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
libxl: introduce flexarray_append_pair
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 9 Mar 2011 17:03:34 +0000 (17:03 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 9 Mar 2011 17:03:34 +0000 (17:03 +0000)
commit8f53c184ea06bb1f060ce9ad30bc24893ff9c950
tree80c2d729120e4ba3adb9bac40322b95bdebd9f97
parent54f4cfa3d8c60fa81dbb28fc83bf5f2272ed4222
libxl: introduce flexarray_append_pair

Introduce flexarray_append_pair: a simple syntactic sugar to add a pair
of pointers to a flexarray, very useful when adding pairs of strings to
xenstore.

Replace flexarray_vappend calls (and one pair of flexarray_append)
with flexarray_append_pair calls when dealing with flexarrays that are
going to be used with libxl__xs_kvs_of_flexarray:

NULL is a valid pointer value in these cases while flexarray_vappend
uses NULL as vargs terminator, so the old code is buggy.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/flexarray.c
tools/libxl/flexarray.h
tools/libxl/libxl.c
tools/libxl/libxl_pci.c