Skip to content

Commit be48f55

Browse files
committed
Remove unneeded check in CFRelease and CFRetain.
If they were NULL, the program would just exit so this check is not needed
1 parent b8a67da commit be48f55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CoreFoundation/Base.subproj/CFRuntime.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ CFTypeRef _CFNonObjCRetain(CFTypeRef cf) {
771771

772772
CFTypeRef CFRetain(CFTypeRef cf) {
773773
if (NULL == cf) { CRSetCrashLogMessage("*** CFRetain() called with NULL ***"); HALT; }
774-
if (cf) __CFGenericAssertIsCF(cf);
774+
__CFGenericAssertIsCF(cf);
775775
return _CFRetain(cf, false);
776776
}
777777

@@ -789,7 +789,7 @@ void _CFNonObjCRelease(CFTypeRef cf) {
789789

790790
void CFRelease(CFTypeRef cf) {
791791
if (NULL == cf) { CRSetCrashLogMessage("*** CFRelease() called with NULL ***"); HALT; }
792-
if (cf) __CFGenericAssertIsCF(cf);
792+
__CFGenericAssertIsCF(cf);
793793
_CFRelease(cf);
794794
}
795795

0 commit comments

Comments
 (0)