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
base: master
from

Conversation

Projects
None yet
3 participants
@alagoutte
Contributor

alagoutte commented Mar 30, 2017

…-context]

May be also update the comment

@mention-bot

This comment has been minimized.

mention-bot commented Mar 30, 2017

@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

@bagder

bagder approved these changes Mar 30, 2017

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

@bagder bagder closed this in 244e0a3 Mar 30, 2017

@bagder

This comment has been minimized.

Member

bagder commented Mar 30, 2017

Thanks!

@alagoutte

This comment has been minimized.

Contributor

alagoutte commented Mar 30, 2017

May be also update the comment ?

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

@bagder

This comment has been minimized.

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

This comment has been minimized.

Contributor

alagoutte commented Mar 30, 2017

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

@bagder

This comment has been minimized.

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.