Functions returning "unit" correspond to C fns which use -1 for failure
[ocaml-libvirt.git] / libvirt / generator.pl
index 8590ea7..abebfff 100755 (executable)
@@ -749,7 +749,7 @@ sub gen_c_code
   int r;
 
   NONBLOCKING (r = $c_name ($1, i));
-  CHECK_ERROR (!r, conn, \"$c_name\");
+  CHECK_ERROR (r == -1, conn, \"$c_name\");
 
   CAMLreturn (Val_unit);
 "