[Libguestfs] [PATCH 08/10] c: Fix prototype generator when last argument is a BufferIn
Richard W.M. Jones
rjones at redhat.com
Fri Jan 20 12:43:37 UTC 2012
On Fri, Jan 20, 2012 at 11:07:51AM +0000, Matthew Booth wrote:
> We were passing the name of the last argument directly to va_start. However, if
> the last argument is a BufferIn it expands to 2 arguments, the latter of which
> is <name>_size.
> ---
> generator/generator_c.ml | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/generator/generator_c.ml b/generator/generator_c.ml
> index 35c0534..ba6a324 100644
> --- a/generator/generator_c.ml
> +++ b/generator/generator_c.ml
> @@ -1404,7 +1404,13 @@ trace_send_line (guestfs_h *g)
> | _ ->
> match args with
> | [] -> "g"
> - | args -> name_of_argt (List.hd (List.rev args)) in
> + | args ->
> + let last = (List.hd (List.rev args)) in
Some over-bracketing going on here. Don't need the
outer parens (List.hd ... ).
ACK with this change.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list