diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-10-18 21:03:02 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2007-10-18 21:03:02 +0200 |
commit | 7435ccf486eee2f60d6a8b2ab0029b8f4ce17ab7 (patch) | |
tree | e3d275c3b2c1229cc12eb7aeb2531d009fc3c919 /irc.c | |
parent | e9b755e3726fa41ac2d4ed1c3a6192d1af68edbc (diff) |
Fix indentation.
Diffstat (limited to 'irc.c')
-rw-r--r-- | irc.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -45,7 +45,7 @@ irc_t *irc_new( int fd ) { irc_t *irc; struct sockaddr_storage sock; - socklen_t socklen = sizeof(sock); + socklen_t socklen = sizeof( sock ); irc = g_new0( irc_t, 1 ); @@ -66,25 +66,25 @@ irc_t *irc_new( int fd ) if( global.conf->hostname ) irc->myhost = g_strdup( global.conf->hostname ); - else if( getsockname( irc->fd, (struct sockaddr*) &sock, &socklen ) == 0) + else if( getsockname( irc->fd, (struct sockaddr*) &sock, &socklen ) == 0 ) { - irc->myhost = g_new0(char, NI_MAXHOST); + irc->myhost = g_new0( char, NI_MAXHOST ); - if (getnameinfo((struct sockaddr *)&sock, socklen, irc->myhost, - NI_MAXHOST, NULL, -1, 0)) { + if (getnameinfo( (struct sockaddr *) &sock, socklen, irc->myhost, + NI_MAXHOST, NULL, -1, 0) ) { /* Rare, but possible. */ - strncpy(irc->myhost, "localhost.", NI_MAXHOST); + strncpy( irc->myhost, "localhost.", NI_MAXHOST ); } } - if( getpeername( irc->fd, (struct sockaddr*) &sock, &socklen ) == 0) + if( getpeername( irc->fd, (struct sockaddr*) &sock, &socklen ) == 0 ) { - irc->host = g_new0(char, NI_MAXHOST); + irc->host = g_new0( char, NI_MAXHOST ); - if (getnameinfo((struct sockaddr *)&sock, socklen, irc->host, - NI_MAXHOST, NULL, -1, 0)) { + if ( getnameinfo( (struct sockaddr *)&sock, socklen, irc->host, + NI_MAXHOST, NULL, -1, 0 ) ) { /* Rare, but possible. */ - strncpy(irc->myhost, "localhost.", NI_MAXHOST); + strncpy( irc->myhost, "localhost.", NI_MAXHOST ); } } |