1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 13:52:21 +00:00

libstrat: fix more minor style issues pointed out by Pharynx

This commit is contained in:
Michael Scire 2023-08-10 11:48:28 -07:00
parent 4e6bd19fcd
commit fca213460b
2 changed files with 30 additions and 30 deletions

View file

@ -29,7 +29,7 @@ namespace ams::fssystem {
public: public:
ZeroStorage() { /* ... */ } ZeroStorage() { /* ... */ }
virtual ~ZeroStorage() { /* ... */ } virtual ~ZeroStorage() { /* ... */ }
public:
virtual Result Read(s64 offset, void *buffer, size_t size) override { virtual Result Read(s64 offset, void *buffer, size_t size) override {
AMS_ASSERT(offset >= 0); AMS_ASSERT(offset >= 0);
AMS_ASSERT(buffer != nullptr || size == 0); AMS_ASSERT(buffer != nullptr || size == 0);

View file

@ -143,7 +143,7 @@ namespace ams::fssystem {
/* Check if we have a rights id. */ /* Check if we have a rights id. */
constexpr const u8 ZeroRightsId[NcaHeader::RightsIdSize] = {}; constexpr const u8 ZeroRightsId[NcaHeader::RightsIdSize] = {};
if (crypto::IsSameBytes(ZeroRightsId, m_header.rights_id, NcaHeader::RightsIdSize)) { if (crypto::IsSameBytes(ZeroRightsId, m_header.rights_id, NcaHeader::RightsIdSize)) {
/* If we do, then we don't have an external key, so we need to generate decryption keys if software keys are available. */ /* If we don't, then we don't have an external key, so we need to generate decryption keys if software keys are available. */
if (crypto_cfg.is_available_sw_key) { if (crypto_cfg.is_available_sw_key) {
crypto_cfg.generate_key(m_decryption_keys[NcaHeader::DecryptionKey_AesCtr], crypto::AesDecryptor128::KeySize, m_header.encrypted_key_area + NcaHeader::DecryptionKey_AesCtr * crypto::AesDecryptor128::KeySize, crypto::AesDecryptor128::KeySize, GetKeyTypeValue(m_header.key_index, m_header.GetProperKeyGeneration())); crypto_cfg.generate_key(m_decryption_keys[NcaHeader::DecryptionKey_AesCtr], crypto::AesDecryptor128::KeySize, m_header.encrypted_key_area + NcaHeader::DecryptionKey_AesCtr * crypto::AesDecryptor128::KeySize, crypto::AesDecryptor128::KeySize, GetKeyTypeValue(m_header.key_index, m_header.GetProperKeyGeneration()));