Skip to content

Commit

Permalink
Whitespace fixes (no functional changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarton committed Aug 1, 2015
1 parent 0083fe1 commit 9811223
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 74 deletions.
10 changes: 5 additions & 5 deletions src/ngircd/channel.c
Expand Up @@ -352,16 +352,16 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name,
!Channel_UserHasMode(chan, Target, 'q') &&
!Channel_UserHasMode(chan, Target, 'a'))
can_kick = true;
/* Half Op can't kick owner | admin | op */

/* Half Op can't kick owner | admin | op */
else if (Channel_UserHasMode(chan, Peer, 'h') &&
!Channel_UserHasMode(chan, Target, 'q') &&
!Channel_UserHasMode(chan, Target, 'a') &&
!Channel_UserHasMode(chan, Target, 'o'))
can_kick = true;

/* IRC operators & IRCd with OperCanMode enabled
* can kick anyways regardless of privilege */
* can kick anyways regardless of privilege */
else if(Client_HasMode(Origin, 'o') && Conf_OperCanMode)
can_kick = true;

Expand Down Expand Up @@ -1044,7 +1044,7 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
switch( Type )
{
case REMOVE_QUIT:
/* QUIT: other servers have already been notified,
/* QUIT: other servers have already been notified,
* see Client_Destroy(); so only inform other clients
* in same channel. */
assert( InformServer == false );
Expand Down
12 changes: 6 additions & 6 deletions src/ngircd/client.c
Expand Up @@ -72,7 +72,7 @@ GLOBAL void
Client_Init( void )
{
struct hostent *h;

This_Server = New_Client_Struct( );
if( ! This_Server )
{
Expand All @@ -98,7 +98,7 @@ Client_Init( void )
Client_SetInfo( This_Server, Conf_ServerInfo );

My_Clients = This_Server;

memset( &My_Whowas, 0, sizeof( My_Whowas ));
} /* Client_Init */

Expand All @@ -111,7 +111,7 @@ Client_Exit( void )

if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
else Client_Destroy( This_Server, "Server going down.", NULL, false );

cnt = 0;
c = My_Clients;
while(c) {
Expand Down Expand Up @@ -228,7 +228,7 @@ GLOBAL void
Client_Destroy( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit )
{
/* remove a client */

CLIENT *last, *c;
char msg[COMMAND_LEN];
const char *txt;
Expand Down Expand Up @@ -381,7 +381,7 @@ Client_SetID( CLIENT *Client, const char *ID )
{
assert( Client != NULL );
assert( ID != NULL );

strlcpy( Client->id, ID, sizeof( Client->id ));

if (Conf_CloakUserToNick) {
Expand Down Expand Up @@ -698,7 +698,7 @@ Client_ID( CLIENT *Client )
if(Client->type == CLIENT_USER)
assert(strlen(Client->id) < Conf_MaxNickLength);
#endif

if( Client->id[0] ) return Client->id;
else return "*";
} /* Client_ID */
Expand Down
2 changes: 1 addition & 1 deletion src/ngircd/conf.c
Expand Up @@ -364,7 +364,7 @@ Conf_Test( void )
? (const char*) array_start(&Conf_Motd) : "");
}
printf(" Network = %s\n", Conf_Network);
if (!Conf_PAM)
if (!Conf_PAM)
printf(" Password = %s\n", Conf_ServerPwd);
printf(" PidFile = %s\n", Conf_PidFile);
printf(" Ports = ");
Expand Down
4 changes: 2 additions & 2 deletions src/ngircd/conn-func.c
Expand Up @@ -138,7 +138,7 @@ GLOBAL CONN_ID
Conn_First( void )
{
CONN_ID i;

for( i = 0; i < Pool_Size; i++ )
{
if( My_Connections[i].sock != NONE ) return i;
Expand All @@ -152,7 +152,7 @@ Conn_Next( CONN_ID Idx )
CONN_ID i = NONE;

assert( Idx > NONE );

for( i = Idx + 1; i < Pool_Size; i++ )
{
if( My_Connections[i].sock != NONE ) return i;
Expand Down
4 changes: 1 addition & 3 deletions src/ngircd/conn-ssl.c
Expand Up @@ -745,7 +745,7 @@ ConnSSL_InitCertFp( CONNECTION *c )
gnutls_x509_crt_deinit(cert);
return 0;
}

if (gnutls_x509_crt_import(cert, &cert_list[0],
GNUTLS_X509_FMT_DER) != GNUTLS_E_SUCCESS) {
gnutls_x509_crt_deinit(cert);
Expand Down Expand Up @@ -912,5 +912,3 @@ ConnSSL_InitLibrary(void)

#endif /* SSL_SUPPORT */
/* -eof- */


4 changes: 2 additions & 2 deletions src/ngircd/conn-zip.c
Expand Up @@ -175,7 +175,7 @@ Zip_Flush( CONN_ID Idx )
}

My_Connections[Idx].bytes_out += zipbuf_used;
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
array_trunc(&My_Connections[Idx].zip.wbuf);

return true;
Expand All @@ -198,7 +198,7 @@ Unzip_Buffer( CONN_ID Idx )
int unzipbuf_used = 0;
unsigned int z_rdatalen;
unsigned int in_len;

z_stream *in;

assert( Idx > NONE );
Expand Down
8 changes: 4 additions & 4 deletions src/ngircd/conn.c
Expand Up @@ -328,7 +328,7 @@ Conn_Init( void )
array_bytes(&My_ConnArray));

assert(array_length(&My_ConnArray, sizeof(CONNECTION)) >= (size_t)Pool_Size);

array_free( &My_Listeners );

for (i = 0; i < Pool_Size; i++)
Expand Down Expand Up @@ -796,7 +796,7 @@ Conn_Handler(void)
GLOBAL bool
Conn_WriteStr(CONN_ID Idx, const char *Format, ...)
#else
GLOBAL bool
GLOBAL bool
Conn_WriteStr(Idx, Format, va_alist)
CONN_ID Idx;
const char *Format;
Expand Down Expand Up @@ -829,7 +829,7 @@ va_dcl
* IRC_WriteXXX() functions when the prefix of this server had
* to be added to an already "quite long" command line which
* has been received from a regular IRC client, for example.
*
*
* We are not allowed to send such "oversized" messages to
* other servers and clients, see RFC 2812 2.3 and 2813 3.3
* ("these messages SHALL NOT exceed 512 characters in length,
Expand Down Expand Up @@ -2364,7 +2364,7 @@ Simple_Message(int Sock, const char *Msg)
* @returns Pointer to CLIENT structure.
*/
GLOBAL CLIENT *
Conn_GetClient( CONN_ID Idx )
Conn_GetClient( CONN_ID Idx )
{
CONNECTION *c;

Expand Down
2 changes: 1 addition & 1 deletion src/ngircd/login.c
Expand Up @@ -92,7 +92,7 @@ Login_User(CLIENT * Client)
/* Don't do any PAM authentication at all if PAM is not
* enabled, instead emulate the behavior of the daemon
* compiled without PAM support. */
if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
return Login_User_PostAuth(Client);
Client_Reject(Client, "Bad server password", false);
return DISCONNECTED;
Expand Down
4 changes: 2 additions & 2 deletions src/ngircd/ngircd.c
Expand Up @@ -530,7 +530,7 @@ Pidfile_Create(pid_t pid)
close(pidfd);
return;
}

if (write(pidfd, pidbuf, (size_t)len) != (ssize_t)len)
Log(LOG_ERR, "Can't write PID file (%s): %s!", Conf_PidFile,
strerror(errno));
Expand Down Expand Up @@ -721,7 +721,7 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
Log(LOG_ERR, "Can't change group ID to %s(%u): %s!",
grp ? grp->gr_name : "?", Conf_GID,
strerror(real_errno));
if (real_errno != EPERM)
if (real_errno != EPERM)
goto out;
}
#ifdef HAVE_SETGROUPS
Expand Down
2 changes: 1 addition & 1 deletion src/ngircd/parse.c
Expand Up @@ -156,7 +156,7 @@ Parse_GetCommandStruct( void )

/**
* Parse a command ("request") received from a client.
*
*
* This function is called after the connection layer received a valid CR+LF
* terminated line of text: we assume that this is a valid IRC command and
* try to do something useful with it :-)
Expand Down
2 changes: 1 addition & 1 deletion src/portab/portabtest.c
Expand Up @@ -196,7 +196,7 @@ main(void)
Check_strlcat();
Check_strtok_r();
Check_vsnprintf(2+10, "%s%s", "ab", "1234567890");

return 0;
}

Expand Down

0 comments on commit 9811223

Please sign in to comment.