Skip to content

fix an incorrect if-clause in net.cpp#1225

Merged
jgarzik merged 1 commit intobitcoin:masterfrom
Diapolo:net_cpp_if_clause
May 9, 2012
Merged

fix an incorrect if-clause in net.cpp#1225
jgarzik merged 1 commit intobitcoin:masterfrom
Diapolo:net_cpp_if_clause

Conversation

@Diapolo
Copy link
Copy Markdown

@Diapolo Diapolo commented May 8, 2012

@laanwj
Copy link
Copy Markdown
Member

laanwj commented May 8, 2012

sub-optimal? just call it incorrect :) (hSocketMax > (SOCKET) -1) is impossible to trigger.

@jgarzik
Copy link
Copy Markdown
Contributor

jgarzik commented May 8, 2012

It still needs the (SOCKET) cast to be portable to all platforms without warnings, I think

@laanwj
Copy link
Copy Markdown
Member

laanwj commented May 8, 2012

Yes, it still needs the (SOCKET) cast, otherwise you'll be comparing a signed against an unsigned value.

@Diapolo
Copy link
Copy Markdown
Author

Diapolo commented May 8, 2012

:-P² All good ends well?

@laanwj
Copy link
Copy Markdown
Member

laanwj commented May 9, 2012

If you don't like the magic value make it compare against INVALID_SOCKET. After all, it is a socket number. SOCKET_ERROR is a signed error value and is meant for comparing against wsaGetError() output.

You wanted to compare against both INVALID_SOCKET and SOCKET_ERROR which is the part I disagreed with.

@Diapolo
Copy link
Copy Markdown
Author

Diapolo commented May 9, 2012

Updated and rebased!

@laanwj
Copy link
Copy Markdown
Member

laanwj commented May 9, 2012

ACK

jgarzik pushed a commit that referenced this pull request May 9, 2012
fix an incorrect if-clause in net.cpp
@jgarzik jgarzik merged commit d54e6e8 into bitcoin:master May 9, 2012
coblee pushed a commit to litecoin-project/litecoin that referenced this pull request Jul 17, 2012
fix an incorrect if-clause in net.cpp
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
* Store time we saw mnb last time, bump sync timeout
if we received seen mnb but we are too close to MASTERNODE_NEW_START_REQUIRED_SECONDS

* Reset blockchain sync status if new blocks were accepted during sync

* Add some debug log output

* wait for at least one new block to be accepted

* bump CGovernanceManager-Version
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
Use define, rather than hard-coded string
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants