Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use nil instead of string pointer
Browse files Browse the repository at this point in the history
wesw-stripe committed Jan 30, 2025
1 parent d28a963 commit b7ffaf6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Keychain.swift
Original file line number Diff line number Diff line change
@@ -80,8 +80,7 @@ public func translateErrCode(_ status: OSStatus) -> String {
// converts a keychain OSStatus error code into human readable string.
os_log("Attempting to translate Error Code: %{public}@",
log: keychainLog, type: .default, String(describing: status))
var uselessString: CFString?
let message = SecCopyErrorMessageString(status, &uselessString)
let message = SecCopyErrorMessageString(status, nil)
return (message as? String) ?? "Unknown status: \(status)"
}

0 comments on commit b7ffaf6

Please sign in to comment.