Skip to content

Commit

Permalink
BNetworkAddress: Fix review comments (again).
Browse files Browse the repository at this point in the history
Axel changed his mind about the status on Unset(), and I messed
up the fStatus setters.
  • Loading branch information
waddlesplash committed Jul 29, 2015
1 parent 7482390 commit 1690d2f
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/kits/network/libnetapi/NetworkAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ BNetworkAddress::Unset()
{
fAddress.ss_family = AF_UNSPEC;
fAddress.ss_len = 2;
fStatus = B_NO_INIT;
fStatus = B_OK;
}


Expand All @@ -177,10 +177,9 @@ BNetworkAddress::SetTo(const char* host, uint16 port, uint32 flags)

cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status != B_OK) {
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
}
return status;
}

Expand All @@ -207,10 +206,9 @@ BNetworkAddress::SetTo(const char* host, const char* service, uint32 flags)

cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status != B_OK) {
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
}
return status;
}

Expand All @@ -235,10 +233,9 @@ BNetworkAddress::SetTo(int family, const char* host, uint16 port, uint32 flags)

uint32 cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status != B_OK) {
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
}
return status;
}

Expand All @@ -264,10 +261,9 @@ BNetworkAddress::SetTo(int family, const char* host, const char* service,

uint32 cookie = 0;
status = resolver->GetNextAddress(&cookie, *this);
if (status != B_OK) {
fStatus = status;
if (status != B_OK)
Unset();
fStatus = status;
}
return status;
}

Expand Down

0 comments on commit 1690d2f

Please sign in to comment.