X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/fa7225c82381bac4432a6edf16f53b5370238d85..dd5fb164cf5b32c462296bc65e289e100f74b59a:/OSX/libsecurity_codesigning/lib/SecAssessment.cpp diff --git a/OSX/libsecurity_codesigning/lib/SecAssessment.cpp b/OSX/libsecurity_codesigning/lib/SecAssessment.cpp index 2c1e06bd..f3395e63 100644 --- a/OSX/libsecurity_codesigning/lib/SecAssessment.cpp +++ b/OSX/libsecurity_codesigning/lib/SecAssessment.cpp @@ -427,12 +427,7 @@ CFDictionaryRef SecAssessmentCopyUpdate(CFTypeRef target, CFRef result; // make context exist and writable - CFMutableDictionaryRef mcontext; - if (context == NULL) { - mcontext = makeCFMutableDictionary(); - } else { - mcontext = makeCFMutableDictionary(context); - } + CFRef mcontext = context ? makeCFMutableDictionary(context) : makeCFMutableDictionary(); if (CFDictionaryGetValue(mcontext, kSecAssessmentUpdateKeyAuthorization) == NULL) { // no authorization passed in. Make an empty one in this context @@ -468,7 +463,7 @@ CFDictionaryRef SecAssessmentCopyUpdate(CFTypeRef target, traceUpdate(target, context, result); return result.yield(); - END_CSAPI_ERRORS1(false) + END_CSAPI_ERRORS1(NULL) }