Skip to content

Commit 0c9487e

Browse files
Morel BérengerVReaperV
authored andcommitted
recvmsg: use memset instead of for-loop
1 parent 31434fe commit 0c9487e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/common/IPC/Primitives.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ bool InternalRecvMsg(Sys::OSHandle handle, Util::Reader& reader)
343343
recvBuffer.reset(new char[NACL_ABI_IMC_BYTES_MAX]);
344344
}
345345

346-
for (size_t i = 0; i < NACL_ABI_IMC_DESC_MAX; i++)
347-
h[i] = NACL_INVALID_HANDLE;
346+
memset( h, 0xff, sizeof(h) );
348347

349348
#ifdef __native_client__
350349
hdr.iov = iov;

0 commit comments

Comments
 (0)