style(sonar): fix cpp:S6185 (#4133)

This commit is contained in:
ReenigneArcher
2025-08-07 23:17:13 -04:00
committed by GitHub
parent a28c20df18
commit dbe80d0f92
17 changed files with 73 additions and 41 deletions

View File

@@ -4,6 +4,7 @@
*/
// standard includes
#include <fcntl.h>
#include <format>
#include <sstream>
#include <string>
@@ -574,7 +575,7 @@ namespace va {
if (!display) {
char string[1024];
auto bytes = readlink(("/proc/self/fd/" + std::to_string(fd)).c_str(), string, sizeof(string));
auto bytes = readlink(std::format("/proc/self/fd/{}", fd).c_str(), string, sizeof(string));
std::string_view render_device {string, (std::size_t) bytes};