Skip to content

Commit 828d781

Browse files
author
Marcello Seri
committed
lib/xcp_service: be more conservative with unsafe_of_string
Signed-off-by: Marcello Seri <[email protected]>
1 parent 570768a commit 828d781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/xcp_service.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ let pidfile_write filename =
495495
let pid = Unix.getpid () in
496496
let buf =
497497
string_of_int pid ^ "\n"
498-
|> Bytes.unsafe_of_string
498+
|> Bytes.of_string
499499
in
500500
let len = Bytes.length buf in
501501
if Unix.write fd buf 0 len <> len

0 commit comments

Comments
 (0)