Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Possible issue with incorrect errno usage #31

Closed
botov opened this issue Dec 16, 2015 · 1 comment
Closed

Possible issue with incorrect errno usage #31

botov opened this issue Dec 16, 2015 · 1 comment

Comments

@botov
Copy link

botov commented Dec 16, 2015

As you know errno provides error code of the latest system code failed. So in the following method:
public class func dataForKey(keyName: String) -> NSData? { ...
probably this was meant here:
return status == errSecSuccess ? result as? NSData : nil
instead of this:
return status == noErr ? result as? NSData : nil

@botov
Copy link
Author

botov commented Dec 17, 2015

Sorry, I was wrong.

noErr OSErr: function performed properly - no error

I thought that's an Swift's equivalent of errno.

@botov botov closed this as completed Dec 17, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant