Skip to content

Commit

Permalink
Silence analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Apr 29, 2021
1 parent 1ca48be commit fafc52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NVMeFix/NVMeFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ void NVMeFixPlugin::forceEnableASPM(IOService *device) {
auto prop = device->getProperty("pci-aspm-default");
if (prop) {
auto num = OSDynamicCast(OSNumber, prop);
if (num) {
if (num != nullptr) {
aspm = num->unsigned32BitValue();
} else {
auto data = OSDynamicCast(OSData, prop);
if (data && data->getLength() == sizeof(aspm))
if (data != nullptr && data->getLength() == sizeof(aspm))
lilu_os_memcpy(&aspm, data->getBytesNoCopy(), sizeof(aspm));
}
}
Expand Down

0 comments on commit fafc52d

Please sign in to comment.