Skip to content

Commit 8140f81

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 d248649 commit 8140f81

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
@@ -786,7 +786,7 @@ CFTypeRef _CFNonObjCRetain(CFTypeRef cf) {
786786

787787
CFTypeRef CFRetain(CFTypeRef cf) {
788788
if (NULL == cf) { CRSetCrashLogMessage("*** CFRetain() called with NULL ***"); HALT; }
789-
if (cf) __CFGenericAssertIsCF(cf);
789+
__CFGenericAssertIsCF(cf);
790790
return _CFRetain(cf, false);
791791
}
792792

@@ -804,7 +804,7 @@ void _CFNonObjCRelease(CFTypeRef cf) {
804804

805805
void CFRelease(CFTypeRef cf) {
806806
if (NULL == cf) { CRSetCrashLogMessage("*** CFRelease() called with NULL ***"); HALT; }
807-
if (cf) __CFGenericAssertIsCF(cf);
807+
__CFGenericAssertIsCF(cf);
808808
_CFRelease(cf);
809809
}
810810

0 commit comments

Comments
 (0)