Skip to content

Commit 659b9b1

Browse files
committed
Fix incorrect calloc() invocation; remove stray undeclared call.
1 parent 58a6638 commit 659b9b1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

CoreFoundation/Base.subproj/CFRuntime.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ CF_INLINE CFRuntimeBase *_cf_aligned_calloc(size_t align, CFIndex size, const ch
420420
CFLog(kCFLogLevelWarning, CFSTR("*** _CFRuntimeCreateInstance() tried to allocate an instance of '%s', which requires %zu-byte alignment, but memory could not be so allocated: %s"), className, align, errorStringPointer);
421421
#elif TARGET_OS_WIN32
422422
CFLog(kCFLogLevelWarning, CFSTR("*** _CFRuntimeCreateInstance() tried to allocate an instance of '%s', which requires %zu-byte alignment, but aligned memory is not supported on this platform"), className, align);
423-
memory = (CFRuntimeBase *)calloc(size);
423+
memory = (CFRuntimeBase *)calloc(1, size);
424424
#else
425425
CFLog(kCFLogLevelWarning, CFSTR("*** _CFRuntimeCreateInstance() tried to allocate an instance of '%s', which requires %zu-byte alignment, but aligned memory is not supported on this platform"), className, align);
426426
memory = NULL;
@@ -1208,9 +1208,6 @@ void __CFInitialize(void) {
12081208
CFNumberGetTypeID(); // NB: This does other work
12091209

12101210
__CFCharacterSetInitialize();
1211-
#if TARGET_OS_WIN32
1212-
__CFWindowsNamedPipeInitialize();
1213-
#endif
12141211
__CFDateInitialize();
12151212

12161213
#if DEPLOYMENT_RUNTIME_SWIFT

0 commit comments

Comments
 (0)