Skip to content

Commit fd31c5c

Browse files
committed
A couple of Win32 fixes.
rdar://103071801
1 parent 7d651d5 commit fd31c5c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

include/swift/Threading/Impl/Win32/Win32Defs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ typedef struct _RTL_CONDITION_VARIABLE *PRTL_CONDITION_VARIABLE;
4747
typedef PRTL_CONDITION_VARIABLE PCONDITION_VARIABLE;
4848

4949
// These have to be #defines, to avoid problems with <windows.h>
50-
#define RTL_SRWLOCK_INIT \
51-
{ 0 }
50+
#define RTL_SRWLOCK_INIT {0}
5251
#define SRWLOCK_INIT RTL_SRWLOCK_INIT
5352
#define FLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
5453

stdlib/public/runtime/Win32.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ swift::_swift_wideFromUTF8(const char *str) {
6868
}
6969

7070
result = reinterpret_cast<wchar_t *>(std::malloc(len * sizeof(wchar_t)));
71-
if (!reuslt) {
71+
if (!result) {
7272
swift::fatalError(0, "unable to allocate space to convert '%s': %d\n",
7373
str, errno);
7474
}
@@ -85,6 +85,4 @@ swift::_swift_wideFromUTF8(const char *str) {
8585
return result;
8686
}
8787

88-
} // namespace swift
89-
9088
#endif // defined(_WIN32)

0 commit comments

Comments
 (0)