diff --git a/ocaml/libs/xapi-rrd/lib/rrd_utils.ml b/ocaml/libs/xapi-rrd/lib/rrd_utils.ml index 61bdb6f22ac..c0863d0175f 100644 --- a/ocaml/libs/xapi-rrd/lib/rrd_utils.ml +++ b/ocaml/libs/xapi-rrd/lib/rrd_utils.ml @@ -122,8 +122,7 @@ module Xmlm_utils = struct | _ -> raise Parse_error in - accept `El_end i ; - d + accept `El_end i ; d ) else raise Parse_error @@ -136,6 +135,5 @@ module Xmlm_utils = struct let read_block t f i = accept (start_tag t) i ; let res = f i in - accept `El_end i ; - res + accept `El_end i ; res end diff --git a/ocaml/libs/xapi-rrd/lib_test/unit_tests.ml b/ocaml/libs/xapi-rrd/lib_test/unit_tests.ml index aa15b94f745..d1938b68a42 100644 --- a/ocaml/libs/xapi-rrd/lib_test/unit_tests.ml +++ b/ocaml/libs/xapi-rrd/lib_test/unit_tests.ml @@ -92,10 +92,10 @@ let test_marshall rrd ~json () = ignore ( if json then Rrd.json_to_string rrd - else - let out = Buffer.create 2048 in - Rrd.xml_to_output rrd (Xmlm.make_output (`Buffer out)) ; - Buffer.contents out + else + let out = Buffer.create 2048 in + Rrd.xml_to_output rrd (Xmlm.make_output (`Buffer out)) ; + Buffer.contents out ) let test_marshall_unmarshall rrd () = @@ -313,7 +313,7 @@ let suite_create_multi = ) in let test_no_rrds () = - Alcotest.check_raises "should raise error" (No_RRA_Available) (fun () -> + Alcotest.check_raises "should raise error" No_RRA_Available (fun () -> let _ = RU.create_multi [] 0L 1L None in () )