X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..c6bf4f310a33a9262d455ea4d3f0630b1255e3fe:/libsa/bootstrap.cpp diff --git a/libsa/bootstrap.cpp b/libsa/bootstrap.cpp index 8f33073a2..f46485a1d 100644 --- a/libsa/bootstrap.cpp +++ b/libsa/bootstrap.cpp @@ -164,7 +164,7 @@ public: ~KLDBootstrap(void); }; -static KLDBootstrap sBootstrapObject; +LIBKERN_ALWAYS_DESTROY static KLDBootstrap sBootstrapObject; /********************************************************************* * Set the function pointers for the entry points into the bootstrap @@ -190,8 +190,8 @@ KLDBootstrap::~KLDBootstrap(void) } - record_startup_extensions_function = 0; - load_security_extensions_function = 0; + record_startup_extensions_function = NULL; + load_security_extensions_function = NULL; } /********************************************************************* @@ -725,7 +725,6 @@ KLDBootstrap::loadSecurityExtensions(void) OSCollectionIterator * keyIterator = NULL;// must release OSString * bundleID = NULL;// don't release OSKext * theKext = NULL;// don't release - OSBoolean * isSecurityKext = NULL;// don't release OSKextLog(/* kext */ NULL, kOSKextLogStepLevel | @@ -761,9 +760,7 @@ KLDBootstrap::loadSecurityExtensions(void) continue; } - isSecurityKext = OSDynamicCast(OSBoolean, - theKext->getPropertyForHostArch(kAppleSecurityExtensionKey)); - if (isSecurityKext && isSecurityKext->isTrue()) { + if (kOSBooleanTrue == theKext->getPropertyForHostArch(kAppleSecurityExtensionKey)) { OSKextLog(/* kext */ NULL, kOSKextLogStepLevel | kOSKextLogLoadFlag,