summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2012-01-18 16:26:26 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-01-23 18:16:15 +0000
commit111761d6c4f200d1eced51cceffcb941bbb68255 (patch)
treef3ff1d37913a884474e07f59eb8433f7f914a259
parentb1bb9e93d3179f3daca78c6e259a93c938e3d3e9 (diff)
downloadlibguestfs-111761d6c4f200d1eced51cceffcb941bbb68255.tar.gz
libguestfs-111761d6c4f200d1eced51cceffcb941bbb68255.tar.xz
libguestfs-111761d6c4f200d1eced51cceffcb941bbb68255.zip
bindtests: Fix sscanf test in test0rhashtable
(cherry picked from commit a20b88be8364fc485d654377819e6daab303ef7a)
-rw-r--r--generator/generator_bindtests.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/generator/generator_bindtests.ml b/generator/generator_bindtests.ml
index 3b363b54..12ce77bb 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";