mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Use noErr constant of OSStatus
This commit is contained in:
1 parent
6b86508d38
commit
8ae0f10162
1 file changed
+5
-5
Vendored
+5
-5
@@ -26,13 +26,13 @@
|
||||
}
|
||||
|
||||
result = SecCodeCopySelf(kSecCSDefaultFlags, &hostCode);
|
||||
if (result != 0) {
|
||||
if (result != noErr) {
|
||||
SULog(@"Failed to copy host code %d", result);
|
||||
goto finally;
|
||||
}
|
||||
|
||||
result = SecCodeCopyDesignatedRequirement(hostCode, kSecCSDefaultFlags, &requirement);
|
||||
if (result != 0) {
|
||||
if (result != noErr) {
|
||||
SULog(@"Failed to copy designated requirement %d", result);
|
||||
goto finally;
|
||||
}
|
||||
@@ -45,7 +45,7 @@
|
||||
}
|
||||
|
||||
result = SecStaticCodeCreateWithPath((__bridge CFURLRef)[newBundle executableURL], kSecCSDefaultFlags, &staticCode);
|
||||
if (result != 0) {
|
||||
if (result != noErr) {
|
||||
SULog(@"Failed to get static code %d", result);
|
||||
goto finally;
|
||||
}
|
||||
@@ -57,7 +57,7 @@
|
||||
if (error) *error = tmpError;
|
||||
}
|
||||
|
||||
if (result != 0) {
|
||||
if (result != noErr) {
|
||||
if (result == errSecCSReqFailed) {
|
||||
CFStringRef requirementString = nil;
|
||||
if (SecRequirementCopyString(requirement, kSecCSDefaultFlags, &requirementString) == noErr) {
|
||||
@@ -74,7 +74,7 @@ finally:
|
||||
if (hostCode) CFRelease(hostCode);
|
||||
if (staticCode) CFRelease(staticCode);
|
||||
if (requirement) CFRelease(requirement);
|
||||
return (result == 0);
|
||||
return (result == noErr);
|
||||
}
|
||||
|
||||
+ (void)logSigningInfoForCode:(SecStaticCodeRef)code label:(NSString*)label {
|
||||
|
||||
Reference in new issue
Block a user