Skip to content

Commit

Permalink
sockaddr: Fix erroneous conflict resolution
Browse files Browse the repository at this point in the history
When rebasing e3aecaf against master
with 005f103 applied (which got rid of
a bunch of unnecessary "else" keywords), I accidentally applied the
wrong conflict resolution and stripped an "else" in a location where it
still needs to be.

To make sure I didn't mess up other things during conflict resolution, I
carefully reviewed the diff of sockaddr.cc to make sure this is the only
location where it went wrong.

Fortunately, we do have tests for that functionality, so fixing the
erroneous conflict resolution now also lets our tests pass again.

Signed-off-by: aszlig <[email protected]>
  • Loading branch information
aszlig committed Aug 6, 2023
1 parent 53a8451 commit d862add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sockaddr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ bool SockAddr::set_port(uint16_t port)
{
if (this->is_inet4())
this->cast4()->sin_port = htons(port);
if (this->is_inet6())
else if (this->is_inet6())
this->cast6()->sin6_port = htons(port);
else
return false;
Expand Down

0 comments on commit d862add

Please sign in to comment.