Skip to content

Commit

Permalink
Avoid runtime pitfalls by removing undefined behaviour.
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-vera committed May 22, 2018
1 parent 3b79f5d commit 9b2a622
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CoreFoundation/Base.subproj/CFPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ static void *__CFTSDGetSpecific() {
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
return pthread_getspecific(__CFTSDIndexKey);
#elif DEPLOYMENT_TARGET_LINUX
__CFTSDInitialize();
return pthread_getspecific(__CFTSDIndexKey);
#elif DEPLOYMENT_TARGET_WINDOWS
return TlsGetValue(__CFTSDIndexKey);
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFUtilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static void _CFShowToFile(FILE *file, Boolean flush, const void *obj) {
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI
fprintf_l(file, NULL, "\n");
#else
fprintf(file, NULL, "\n");
fprintf(file, "\n");
#endif
if (flush) fflush(file);
}
Expand Down

0 comments on commit 9b2a622

Please sign in to comment.