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
net: interface_linux.go
has redundant code
#62683
Comments
I assume what you meant is that it's needless to call |
When |
I agree that this code doesn't make sense, but what I don't know is what it is supposed to do. When this code was introduced in https://go.dev/cl/7400055, it made sense because |
Can I try to finish the job? |
Now we need to wait for the person who left this code to confirm that deleting this code will not have some other effects. |
Okey |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In the above code, the following code logic seems to be an invalid code logic.
len(ift) != 0 || ifi.Index == int(ifam.Index)
never executesifi.Index == int(ifam.Index)
whenlen(ift) != 0
,therefore reassigning
ifi
has no effect.What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: