BNetworkAddress: Fix review comments (again).
Axel changed his mind about the status on Unset(), and I messed up the fStatus setters.
This commit is contained in:
parent
7482390ab4
commit
1690d2f4dd
@ -151,7 +151,7 @@ BNetworkAddress::Unset()
|
||||
{
|
||||
fAddress.ss_family = AF_UNSPEC;
|
||||
fAddress.ss_len = 2;
|
||||
fStatus = B_NO_INIT;
|
||||
fStatus = B_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user