mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
* Clean-up whitespace in net_ip.c
This commit is contained in:
parent
240b25a41f
commit
9018fedd16
1 changed files with 30 additions and 33 deletions
|
@ -856,9 +856,6 @@ int NET_IPSocket( char *net_interface, int port, int *err ) {
|
||||||
// make it broadcast capable
|
// make it broadcast capable
|
||||||
if( setsockopt( newsocket, SOL_SOCKET, SO_BROADCAST, (char *) &i, sizeof(i) ) == SOCKET_ERROR ) {
|
if( setsockopt( newsocket, SOL_SOCKET, SO_BROADCAST, (char *) &i, sizeof(i) ) == SOCKET_ERROR ) {
|
||||||
Com_Printf( "WARNING: NET_IPSocket: setsockopt SO_BROADCAST: %s\n", NET_ErrorString() );
|
Com_Printf( "WARNING: NET_IPSocket: setsockopt SO_BROADCAST: %s\n", NET_ErrorString() );
|
||||||
|
|
||||||
// it is not that bad if this one fails.
|
|
||||||
// return newsocket;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !net_interface || !net_interface[0]) {
|
if( !net_interface || !net_interface[0]) {
|
||||||
|
@ -1256,10 +1253,10 @@ void NET_OpenSocks( int port ) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
=====================
|
=====================
|
||||||
NET_GetLocalAddress
|
NET_AddLocalAddress
|
||||||
=====================
|
=====================
|
||||||
*/
|
*/
|
||||||
void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sockaddr *netmask)
|
static void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sockaddr *netmask)
|
||||||
{
|
{
|
||||||
int addrlen;
|
int addrlen;
|
||||||
sa_family_t family;
|
sa_family_t family;
|
||||||
|
@ -1297,7 +1294,7 @@ void NET_AddLocalAddress(char *ifname, struct sockaddr *addr, struct sockaddr *n
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__linux__) || defined(MACOSX) || defined(__BSD__)
|
#if defined(__linux__) || defined(MACOSX) || defined(__BSD__)
|
||||||
void NET_GetLocalAddress(void)
|
static void NET_GetLocalAddress(void)
|
||||||
{
|
{
|
||||||
struct ifaddrs *ifap, *search;
|
struct ifaddrs *ifap, *search;
|
||||||
|
|
||||||
|
@ -1318,7 +1315,7 @@ void NET_GetLocalAddress(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void NET_GetLocalAddress( void ) {
|
static void NET_GetLocalAddress( void ) {
|
||||||
char hostname[256];
|
char hostname[256];
|
||||||
struct addrinfo hint;
|
struct addrinfo hint;
|
||||||
struct addrinfo *res = NULL;
|
struct addrinfo *res = NULL;
|
||||||
|
|
Loading…
Reference in a new issue