[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5 22/32] libxl: introduce libxl_key_value_list_length
On Tue, 2014-05-13 at 22:54 +0100, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> > --- > tools/libxl/libxl.c | 12 ++++++++++++ > tools/libxl/libxl.h | 1 + > 2 files changed, 13 insertions(+) > > diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c > index 0589d4e..0a73a98 100644 > --- a/tools/libxl/libxl.c > +++ b/tools/libxl/libxl.c > @@ -216,6 +216,18 @@ int libxl_string_list_length(const libxl_string_list > *psl) > return i; > } > > +int libxl_key_value_list_length(libxl_key_value_list *pkvl) > +{ > + int i = 0; > + libxl_key_value_list kvl = *pkvl; > + > + if (kvl) > + while (kvl[2 * i]) /* Only checks keys */ > + i++; {}s for the outermost if would aid readbility a bit should you need to respin for some reason. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |