Permalink
Browse files

fix clang sa issue for potential derefernce of null pointer

  • Loading branch information...
1 parent ca2fa02 commit ed8aa5544e96dc0af1a9c57ebde62be82ebb7a29 @Machx committed Mar 29, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 CWLinkedList.m
View
@@ -186,7 +186,7 @@ -(CWLinkedListNode *)_nodeAtIndex:(NSUInteger)index
error:(NSError **)error {
NSUInteger maxCount = (self.count - 1);
if (index > maxCount) {
- if (*error) {
+ if (error) {
*error = [NSError errorWithDomain:kCWDoublyLinkedListErrorDomain
code:kLLIndexBeyondListBoundsErrorCode
userInfo:@{NSLocalizedFailureReasonErrorKey:
@@ -196,7 +196,7 @@ -(CWLinkedListNode *)_nodeAtIndex:(NSUInteger)index
}
}
if (self.head == nil) {
- if (*error) {
+ if (error) {
*error = [NSError errorWithDomain:kCWDoublyLinkedListErrorDomain
code:kLLAttemptToGetNodeAtIndexWithNoElementsErrorCode
userInfo:@{ NSLocalizedFailureReasonErrorKey :

0 comments on commit ed8aa55

Please sign in to comment.