Add explicit cast to fix build error

PiperOrigin-RevId: 515263097
Change-Id: Ib5b6c28587be889b5e2ef8d013fa57cbb0d8ffd3
This commit is contained in:
Wiktor Garbacz 2023-03-09 01:02:54 -08:00 committed by Copybara-Service
parent e031c11bdc
commit a31584ff49

View File

@ -145,7 +145,7 @@ void RunInitProcess(pid_t main_pid, int pipe_fd,
code.push_back(DENY);
struct sock_fprog prog {
.len = code.size(), .filter = code.data(),
.len = static_cast<uint16_t>(code.size()), .filter = code.data(),
};
SAPI_RAW_CHECK(prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == 0,