Replace magic number with sizeof(). No functionality change.

llvm-svn: 194877
This commit is contained in:
Rui Ueyama 2013-11-15 23:11:00 +00:00
parent dbb7b87d7a
commit 085886430a
1 changed files with 2 additions and 1 deletions

View File

@ -174,7 +174,8 @@ private:
NativeChunk *chunks = NativeChunk *chunks =
reinterpret_cast<NativeChunk*>(reinterpret_cast<char*>(_headerBuffer) reinterpret_cast<NativeChunk*>(reinterpret_cast<char*>(_headerBuffer)
+ sizeof(NativeFileHeader)); + 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->endian = NFH_LittleEndian;
_headerBuffer->architecture = 0; _headerBuffer->architecture = 0;
_headerBuffer->fileSize = 0; _headerBuffer->fileSize = 0;