Attention is currently required from: osmith.
3 comments:
File src/core/socket.c:
Patch Set #2, Line 922: IPv4 or IPv6
IPv4-only or IPv6-only
Ack
Patch Set #2, Line 933: * Both are checked here through "or" here to account for "bind flag set,
what do you mean with 'checked through "or" here', did you mean to write it like this? […]
I'm talking about OSMO_SOCK_F_BIND or OSMO_SOCK_F_CONNECT flags here.
If for instance OSMO_SOCK_F_BIND is not set, rem_has_v6addr needs checking, and if OSMO_SOCK_F_CONNECT is not set, loc_has_v6addr needs checking. If both are set, both need checking.
Patch Set #2, Line 945: (loc_has_v4addr != rem_has_v4addr || loc_has_v6addr != rem_has_v6addr)) {
with multiple return paths I mean, to potentially make it more readable
I thought about it, but in the end writing it this way is the easiest way of writing it, instead of writing lots of cases. I think the comment already hints it.
My point is that no matter how you write it, it's going to need some thinking when reading it.
To view, visit change 35232. To unsubscribe, or for help writing mail filters, visit settings.