* Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25738 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,20 +1,21 @@
|
||||
/*
|
||||
* Copyright 2007, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2007-2008, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Hugo Santos, [email protected]
|
||||
*/
|
||||
|
||||
#ifndef ADDRESS_UTILITIES_H
|
||||
#define ADDRESS_UTILITIES_H
|
||||
#ifndef NET_ADDRESS_UTILITIES_H
|
||||
#define NET_ADDRESS_UTILITIES_H
|
||||
|
||||
|
||||
#include <NetUtilities.h>
|
||||
|
||||
#include <net_datalink.h>
|
||||
|
||||
#include <sys/socket.h>
|
||||
|
||||
|
||||
class SocketAddress {
|
||||
public:
|
||||
SocketAddress(net_address_module_info *module, sockaddr *address)
|
||||
@@ -160,8 +161,8 @@ public:
|
||||
{
|
||||
if (checkPort)
|
||||
return fModule->equal_addresses_and_ports(fAddress, address);
|
||||
else
|
||||
return fModule->equal_addresses(fAddress, address);
|
||||
|
||||
return fModule->equal_addresses(fAddress, address);
|
||||
}
|
||||
|
||||
bool EqualPorts(const sockaddr *second) const
|
||||
@@ -195,7 +196,8 @@ public:
|
||||
}
|
||||
|
||||
const char *AsString(char *buffer, size_t bufferSize,
|
||||
bool printPort = false) const {
|
||||
bool printPort = false) const
|
||||
{
|
||||
fModule->print_address_buffer(fAddress, buffer, bufferSize, printPort);
|
||||
return buffer;
|
||||
}
|
||||
@@ -217,4 +219,4 @@ private:
|
||||
sockaddr_storage fAddressStorage;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // NET_ADDRESS_UTILITIES_H
|
||||
|
||||
Reference in New Issue
Block a user