Remove unnecessary check on memcpy return and thus unused
memory exception type.
Change-Id: I95c47cb36cc178b4219bbfa337aa21991cfc0b67
DECLARE_EXCEPTION_TYPE(Base, FStreamOpenError)
DECLARE_EXCEPTION_TYPE(Base, FStreamWriteError)
DECLARE_EXCEPTION_TYPE(Base, FStreamReadError)
- DECLARE_EXCEPTION_TYPE(Base, MemoryError)
DECLARE_EXCEPTION_TYPE(Base, NoPasswords)
DECLARE_EXCEPTION_TYPE(Base, PasswordNotActive)
DECLARE_EXCEPTION_TYPE(Base, MakeDirError)
Throw(PasswordException::OutOfData);
}
- void* ret = memcpy(bytes, &m_buffer[m_bufferReadBytes], num);
-
- if(ret == 0) {
- LogError("Failed to read " << num << " bytes.");
- Throw(PasswordException::MemoryError);
- }
+ memcpy(bytes, &m_buffer[m_bufferReadBytes], num);
m_bufferReadBytes += num;
}