Kernel: Use uniform initialization instead of memset for a few stack buffer.

Raw memset is relatively easy to mess up, avoid it when there are
better alternatives provided by the compiler in modern C++.
This commit is contained in:
Brian Gianforcaro 2021-02-21 02:16:16 -08:00 committed by Andreas Kling
commit cbd8f78cce
Notes: sideshowbarker 2024-07-18 22:03:48 +09:00
3 changed files with 5 additions and 9 deletions

View file

@ -390,8 +390,7 @@ void kgettimeofday(timeval& tv)
siginfo_t Process::wait_info()
{
siginfo_t siginfo;
memset(&siginfo, 0, sizeof(siginfo));
siginfo_t siginfo {};
siginfo.si_signo = SIGCHLD;
siginfo.si_pid = pid().value();
siginfo.si_uid = uid();