From 263b9916c2d3a81b9661f9843479903893d20629 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Nov 2024 10:43:22 +0100 Subject: [PATCH] unix/PidFile: pass std::span to FileDescriptor::Read() --- src/unix/PidFile.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/PidFile.hxx b/src/unix/PidFile.hxx index b50d42b6c..a2072643e 100644 --- a/src/unix/PidFile.hxx +++ b/src/unix/PidFile.hxx @@ -81,7 +81,7 @@ ReadPidFile(Path path) noexcept pid_t pid = -1; char buffer[32]; - auto nbytes = fd.Read(buffer, sizeof(buffer) - 1); + auto nbytes = fd.Read(std::as_writable_bytes(std::span{buffer, sizeof(buffer) - 1})); if (nbytes > 0) { buffer[nbytes] = 0;