Skip to content

[gardening] "if (foo == false)" → "if (!foo)" #1405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2016
Merged

[gardening] "if (foo == false)" → "if (!foo)" #1405

merged 1 commit into from
Feb 23, 2016

Conversation

practicalswift
Copy link
Contributor

No description provided.

@@ -47,7 +47,7 @@ int swift::_swift_dl_iterate_phdr(int (*Callback)(struct dl_phdr_info *info,
BOOL ret = EnumProcessModules(procHandle, modules.data(),
modules.size() * sizeof(HMODULE), &neededSize);

if (ret == FALSE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's FALSE defined as on Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I naïvely assumed 0 but I guess we should be on the safe side and check with the Windows/Cygwin guru @tinysun212 :-)

@tinysun212, do you have time to review? That would be appreciated! :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#define FALSE 0
#define TRUE 1

They are defined at /usr/include/w32api/ntdef.h in Cygwin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tinysun212 Thank you! 👍

gribozavr added a commit that referenced this pull request Feb 23, 2016
[gardening] "if (foo == false)" → "if (!foo)"
@gribozavr gribozavr merged commit ff50514 into swiftlang:master Feb 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants