Skip to content

Commit ff50514

Browse files
committed
Merge pull request #1405 from practicalswift/equals-false
[gardening] "if (foo == false)" → "if (!foo)"
2 parents 5b4c73e + 1b5ea8c commit ff50514

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/public/runtime/CygwinPort.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int swift::_swift_dl_iterate_phdr(int (*Callback)(struct dl_phdr_info *info,
4747
BOOL ret = EnumProcessModules(procHandle, modules.data(),
4848
modules.size() * sizeof(HMODULE), &neededSize);
4949

50-
if (ret == FALSE) {
50+
if (!ret) {
5151
swift::fatalError(/* flags = */ 0, "EnumProcessModules() failed");
5252
return 0;
5353
}
@@ -58,7 +58,7 @@ int swift::_swift_dl_iterate_phdr(int (*Callback)(struct dl_phdr_info *info,
5858
modules.size() * sizeof(HMODULE), &neededSize);
5959
}
6060

61-
if (ret == FALSE) {
61+
if (!ret) {
6262
swift::fatalError(/* flags = */ 0, "EnumProcessModules() failed");
6363
return 0;
6464
}
@@ -95,7 +95,7 @@ uint8_t *swift::_swift_getSectionDataPE(void *handle, const char *sectionName,
9595

9696
bool assert1 =
9797
peStart[ntHeadersOffset] == 'P' && peStart[ntHeadersOffset + 1] == 'E';
98-
if (assert1 == false) {
98+
if (!assert1) {
9999
swift::fatalError(/* flags = */ 0, "_swift_getSectionDataPE()'s finding PE failed");
100100
}
101101

0 commit comments

Comments
 (0)