Add 'make check' as a synonym for 'make test'.
[ocaml-bitstring.git] / bitstring.ml
index 156dec1..831c3b2 100644 (file)
@@ -967,13 +967,11 @@ let construct_int64_le_unsigned buf v flen exn =
 let construct_int64_ne_unsigned =
   if nativeendian = BigEndian
   then construct_int64_be_unsigned
-  else (*construct_int64_le_unsigned*)
-    fun _ _ _ _ -> failwith "construct_int64_le_unsigned"
+  else construct_int64_le_unsigned
 
 let construct_int64_ee_unsigned = function
   | BigEndian -> construct_int64_be_unsigned
-  | LittleEndian -> (*construct_int64_le_unsigned*)
-      (fun _ _ _ _ -> failwith "construct_int64_le_unsigned")
+  | LittleEndian -> construct_int64_le_unsigned
   | NativeEndian -> construct_int64_ne_unsigned
 
 (* Construct from a string of bytes, exact multiple of 8 bits
@@ -1108,7 +1106,7 @@ let equals ((_, _, len1) as bs1) ((_, _, len2) as bs2) =
 let index_out_of_bounds () = invalid_arg "index out of bounds"
 
 let put (data, off, len) n v =
-  if n < 0 || off+n >= len then index_out_of_bounds ()
+  if n < 0 || n >= len then index_out_of_bounds ()
   else (
     let i = off+n in
     let si = i lsr 3 and mask = 0x80 lsr (i land 7) in
@@ -1122,7 +1120,7 @@ let set bits n = put bits n 1
 let clear bits n = put bits n 0
 
 let get (data, off, len) n =
-  if n < 0 || off+n >= len then index_out_of_bounds ()
+  if n < 0 || n >= len then index_out_of_bounds ()
   else (
     let i = off+n in
     let si = i lsr 3 and mask = 0x80 lsr (i land 7) in