Skip to content

Commit

Permalink
Use sprintf instead of Int64.format
Browse files Browse the repository at this point in the history
`Int64.format` was removed in ocaml 5, and ocaml 4.14 displays deprecation
warnings.
  • Loading branch information
benji-sb committed Jul 30, 2024
1 parent c50bf62 commit 7dea21f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pgp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ module Packet = struct
| 9 -> Ok (Key_expiration_time (Cstruct.BE.get_uint32 cs 1))
| 16 ->
let id = Cstruct.BE.get_uint64 cs 1 in
Ok (Issuer_id (Int64.format "%x" id))
Ok (Issuer_id (Printf.sprintf "%Lx" id))
| 27 -> decode_uses cs
| 29 -> decode_revocation_reason cs
| _ -> Ok Unknown
Expand Down Expand Up @@ -700,7 +700,7 @@ module Packet = struct
let signature_type = tag_to_sigtype tag in
if hash_material_len == 5 then
let key_id_int = Cstruct.BE.get_uint64 packet 6 in
let key_id = Int64.format "%x" key_id_int in
let key_id = Printf.sprintf "%Lx" key_id_int in
Ok {tag; version = 3; subpackets = [Issuer_id key_id]; signature_type}
else
Error "Bad hash material length in v3 signature packet"
Expand Down

0 comments on commit 7dea21f

Please sign in to comment.