Navigation Menu

Skip to content
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

gcc7: fix ‘*’ in boolean context, suggest ‘&&’ instead [-Wint-in-bool… #1371

Closed
wants to merge 1 commit into from

Conversation

alagoutte
Copy link
Contributor

…-context]

May be also update the comment

@mention-bot
Copy link

@alagoutte, thanks for your PR! By analyzing the history of the files in this pull request, we identified @yangtse, @bagder and @jay to be potential reviewers.

@bagder bagder added the build label Mar 30, 2017
Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

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

Yes, there's really no point in actually doing the math there.

@bagder bagder closed this in 244e0a3 Mar 30, 2017
@bagder
Copy link
Member

bagder commented Mar 30, 2017

Thanks!

@alagoutte
Copy link
Contributor Author

May be also update the comment ?

So at this
* point returning a value different from sz*nmemb indicates failure. <=

@bagder
Copy link
Member

bagder commented Mar 30, 2017

I don't think we need to. I think the comment explains the logic fine why we return what we do, even if it doesn't match the code exactly. Changing the comment to look like the code makes the language in the comment harder to follow I think?

@alagoutte
Copy link
Contributor Author

may be add different from sz*nmemb (ak sz && nmemb)

@bagder
Copy link
Member

bagder commented Mar 30, 2017

The comment is based on the explanation in the man page:

This callback function must return the number of bytes actually taken care of. If that amount differs from the amount passed in to your function, it'll signal an error to the library.

... and sz * nbmemb is the actual size...

@lock lock bot locked as resolved and limited conversation to collaborators May 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants