From 085886430a520d870876428f31c507fd9e19a0ec Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Fri, 15 Nov 2013 23:11:00 +0000 Subject: [PATCH] Replace magic number with sizeof(). No functionality change. llvm-svn: 194877 --- lld/lib/ReaderWriter/Native/WriterNative.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lld/lib/ReaderWriter/Native/WriterNative.cpp b/lld/lib/ReaderWriter/Native/WriterNative.cpp index de24d4dd2845..2eedb521c368 100644 --- a/lld/lib/ReaderWriter/Native/WriterNative.cpp +++ b/lld/lib/ReaderWriter/Native/WriterNative.cpp @@ -174,7 +174,8 @@ private: NativeChunk *chunks = reinterpret_cast(reinterpret_cast(_headerBuffer) + sizeof(NativeFileHeader)); - memcpy(_headerBuffer->magic, NATIVE_FILE_HEADER_MAGIC, 16); + memcpy(_headerBuffer->magic, NATIVE_FILE_HEADER_MAGIC, + sizeof(_headerBuffer->magic)); _headerBuffer->endian = NFH_LittleEndian; _headerBuffer->architecture = 0; _headerBuffer->fileSize = 0;