forked from OSchip/llvm-project
POSIX: fix possible API misuse
memcpy cannot be passed NULL. Ensuring that the destination pointer is non-NULL requires checking success. Rather than performing the success check at that point, increasing indentation an additional level, fold it into the previous statement. llvm-svn: 203359
This commit is contained in:
parent
d41fca11af
commit
9174593d09
|
@ -347,12 +347,12 @@ RegisterContextPOSIXProcessMonitor_x86_64::ReadAllRegisterValues(DataBufferSP &d
|
|||
|
||||
if (success)
|
||||
{
|
||||
::memcpy (dst, &m_gpr_x86_64, GetGPRSize());
|
||||
dst += GetGPRSize();
|
||||
::memcpy (dst, &m_gpr_x86_64, GetGPRSize());
|
||||
dst += GetGPRSize();
|
||||
if (GetFPRType() == eFXSAVE)
|
||||
::memcpy (dst, &m_fpr.xstate.fxsave, sizeof(m_fpr.xstate.fxsave));
|
||||
}
|
||||
if (GetFPRType() == eFXSAVE)
|
||||
::memcpy (dst, &m_fpr.xstate.fxsave, sizeof(m_fpr.xstate.fxsave));
|
||||
|
||||
|
||||
if (GetFPRType() == eXSAVE)
|
||||
{
|
||||
ByteOrder byte_order = GetByteOrder();
|
||||
|
|
Loading…
Reference in New Issue