Skip to content

Conversation

CryptoManiac
Copy link
Contributor

Valgrind keeps complaining that close() on the invalid descriptor -1 is happening here. I suppose that close shouldn't be called when the descriptor value is known to be invalid. It's not a fatal error or something, but this practice is able to create a lot of flood in the logs.

Valgrind keeps complaining that close() on the invalid descriptor -1 is happening here. I suppose that close shouldn't be called when the descriptor value is known to be invalid. It's not a fatal error or something, but this practice is able to create a lot of flood in the logs.
@bsergean
Copy link
Collaborator

Thanks !
I usually put the -1 on the right hand side but that's fine.

@bsergean bsergean merged commit 98b4828 into machinezone:master Mar 19, 2024
@CryptoManiac
Copy link
Contributor Author

Thanks ! I usually put the -1 on the right hand side but that's fine.

Putting constants on the left side of comparison is a compiler-agnostic way to prevent accidental assignment related bugs. Search for the term Yoda’s notation for more info.

@bsergean
Copy link
Collaborator

bsergean commented Mar 20, 2024 via email

@CryptoManiac
Copy link
Contributor Author

I had forgotten that Yoda denomination. Could you flip it the normal way? I like the code to stay consistent with the classical way.

Sure, I'll revise this tomorrow I think.

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.

2 participants