[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 06/10] bindtests: Fix sscanf test in test0rhashtable



On Fri, Jan 20, 2012 at 11:07:49AM +0000, Matthew Booth wrote:
> ---
>  generator/generator_bindtests.ml |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/generator/generator_bindtests.ml b/generator/generator_bindtests.ml
> index 45fb818..9a87c72 100644
> --- a/generator/generator_bindtests.ml
> +++ b/generator/generator_bindtests.ml
> @@ -167,7 +167,7 @@ print_strings (char *const *argv)
>           | RHashtable _ ->
>               pr "  char **strs;\n";
>               pr "  int n, i;\n";
> -             pr "  if (sscanf (val, \"%%d\", &n) != -1) {\n";
> +             pr "  if (sscanf (val, \"%%d\", &n) != 1) {\n";
>               pr "    error (g, \"%%s: expecting int argument\", \"%s\");\n" name;
>               pr "    return NULL;\n";
>               pr "  }\n";

Ooops ...

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]