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

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



---
 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";
-- 
1.7.7.5


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