Skip to content

Commit

Permalink
Uncommon: remove unused failwith
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Jun 9, 2024
1 parent 51ebdd6 commit 469e658
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion rng/entropy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let cpu_rng_bootstrap =
| Some insn ->
let cpu_rng_bootstrap id =
let r = cpu_rng insn () in
if r = 0 then failwith "bad CPU RNG value";
if r = 0 then failwith "Mirage_crypto_rng.Entropy: 0 is a bad CPU RNG value";
let buf = Bytes.create 10 in
Bytes.set_int64_le buf 2 (Int64.of_int r);
write_header id buf;
Expand Down
1 change: 0 additions & 1 deletion src/mirage_crypto.mli
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ module Uncommon : sig
val xor_into : string -> src_off:int -> bytes -> dst_off:int -> int -> unit

val invalid_arg : ('a, Format.formatter, unit, unit, unit, 'b) format6 -> 'a
val failwith : ('a, Format.formatter, unit, unit, unit, 'b) format6 -> 'a
end

(**/**)
Expand Down
1 change: 0 additions & 1 deletion src/uncommon.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ let kasprintf k fmt =
Format.(kfprintf (fun _ -> k (flush_str_formatter ())) str_formatter fmt)

let invalid_arg fmt = kasprintf invalid_arg ("Mirage_crypto: " ^^ fmt)
let failwith fmt = kasprintf failwith ("Mirage_crypto: " ^^ fmt)

let (//) x y =
if y < 1 then raise Division_by_zero else
Expand Down

0 comments on commit 469e658

Please sign in to comment.