]> Sergey Matveev's repositories - public-inbox.git/commit
syscall: golf + more idiomatic buffer initialization
authorEric Wong <e@80x24.org>
Mon, 18 Apr 2022 09:50:04 +0000 (09:50 +0000)
committerEric Wong <e@80x24.org>
Mon, 18 Apr 2022 21:53:47 +0000 (21:53 +0000)
commitd362af89d8019ff12d3550c83de2c3aa5d9f095b
treea93766da70f0b82530f4eb5add5fb2f1ee404e11
parent88c7c7c26b44ee4c1141fddb628a518b4d4d21a4
syscall: golf + more idiomatic buffer initialization

While `vec' is useful for user-supplied buffers to avoid excess
memory traffic, but provides no benefit when we need to allocate
our own buffers as we do in nodatacow_fh, since Perl can't elide
memset(ptr, 0, len).  So just use the idiomatic `"\0" x $LEN' here.
lib/PublicInbox/Syscall.pm