]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Code cleanup, remove blank lines
authorAlexander Barton <alex@barton.de>
Sun, 16 Mar 2014 21:11:26 +0000 (22:11 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 16 Mar 2014 21:11:26 +0000 (22:11 +0100)
13 files changed:
src/ipaddr/ng_ipaddr.h
src/ngircd/channel.c
src/ngircd/conn-encoding.c
src/ngircd/conn-func.c
src/ngircd/conn.c
src/ngircd/log.c
src/ngircd/match.c
src/ngircd/ngircd.c
src/ngircd/numeric.c
src/ngircd/op.c
src/portab/portab.h
src/portab/strlcpy.c
src/portab/strndup.c

index 8f7376001872bbcd3e4d3ef0f45c4981f9c5017c..799aa88f9dc928d2391ab3eea46369a5bacd03ac 100644 (file)
@@ -4,6 +4,7 @@
 
 #ifndef NG_IPADDR_HDR
 #define NG_IPADDR_HDR
 
 #ifndef NG_IPADDR_HDR
 #define NG_IPADDR_HDR
+
 #include "portab.h"
 
 /**
 #include "portab.h"
 
 /**
index 6b8d74530c7c07c71c532e2379387c97bf1596a3..12bd8128b4f803b414c5e5a5ed594d8a53be7953 100644 (file)
 #define REMOVE_QUIT 1
 #define REMOVE_KICK 2
 
 #define REMOVE_QUIT 1
 #define REMOVE_KICK 2
 
-
 static CHANNEL *My_Channels;
 static CL2CHAN *My_Cl2Chan;
 
 static CHANNEL *My_Channels;
 static CL2CHAN *My_Cl2Chan;
 
-
 static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
 static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
 static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer ));
 static CL2CHAN *Get_Cl2Chan PARAMS(( CHANNEL *Chan, CLIENT *Client ));
 static CL2CHAN *Add_Client PARAMS(( CHANNEL *Chan, CLIENT *Client ));
 static bool Remove_Client PARAMS(( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const char *Reason, bool InformServer ));
index d0c56306698bbe599900073690a127e4e06c8a3a..b827d02ae4d4abe78f67007be5411bd2f218e1f4 100644 (file)
@@ -38,7 +38,6 @@ char Encoding_Buffer[COMMAND_LEN];
 
 char *Convert_Message PARAMS((iconv_t Handle, char *Message));
 
 
 char *Convert_Message PARAMS((iconv_t Handle, char *Message));
 
-
 /**
  * Set client character encoding on a connection.
  *
 /**
  * Set client character encoding on a connection.
  *
@@ -133,7 +132,7 @@ Convert_Message(iconv_t Handle, char *Message)
        return Encoding_Buffer;
 }
 
        return Encoding_Buffer;
 }
 
-#endif
+#endif /* ICONV */
 
 /**
  * Convert encoding of a message received from a connection.
 
 /**
  * Convert encoding of a message received from a connection.
index b56e0f0742fb5298f5d53bac0583c40a52b02873..0ba0ff6c1915932c1cd09448b53b42bd6bc89cd7 100644 (file)
@@ -29,7 +29,6 @@
 #include "exp.h"
 #include "conn-func.h"
 
 #include "exp.h"
 #include "conn-func.h"
 
-
 /**
  * Update "idle timestamp", the time of the last visible user action
  * (e. g. like sending messages, joining or leaving channels).
 /**
  * Update "idle timestamp", the time of the last visible user action
  * (e. g. like sending messages, joining or leaving channels).
@@ -73,7 +72,6 @@ Conn_GetIdle( CONN_ID Idx )
        return time( NULL ) - My_Connections[Idx].lastprivmsg;
 } /* Conn_GetIdle */
 
        return time( NULL ) - My_Connections[Idx].lastprivmsg;
 } /* Conn_GetIdle */
 
-
 GLOBAL time_t
 Conn_LastPing( CONN_ID Idx )
 {
 GLOBAL time_t
 Conn_LastPing( CONN_ID Idx )
 {
@@ -81,7 +79,6 @@ Conn_LastPing( CONN_ID Idx )
        return My_Connections[Idx].lastping;
 } /* Conn_LastPing */
 
        return My_Connections[Idx].lastping;
 } /* Conn_LastPing */
 
-
 /**
  * Add "penalty time" for a connection.
  *
 /**
  * Add "penalty time" for a connection.
  *
@@ -116,7 +113,6 @@ Conn_SetPenalty(CONN_ID Idx, time_t Seconds)
 #endif
 } /* Conn_SetPenalty */
 
 #endif
 } /* Conn_SetPenalty */
 
-
 GLOBAL void
 Conn_ClearFlags( void )
 {
 GLOBAL void
 Conn_ClearFlags( void )
 {
@@ -125,7 +121,6 @@ Conn_ClearFlags( void )
        for( i = 0; i < Pool_Size; i++ ) My_Connections[i].flag = 0;
 } /* Conn_ClearFlags */
 
        for( i = 0; i < Pool_Size; i++ ) My_Connections[i].flag = 0;
 } /* Conn_ClearFlags */
 
-
 GLOBAL int
 Conn_Flag( CONN_ID Idx )
 {
 GLOBAL int
 Conn_Flag( CONN_ID Idx )
 {
@@ -133,7 +128,6 @@ Conn_Flag( CONN_ID Idx )
        return My_Connections[Idx].flag;
 } /* Conn_Flag */
 
        return My_Connections[Idx].flag;
 } /* Conn_Flag */
 
-
 GLOBAL void
 Conn_SetFlag( CONN_ID Idx, int Flag )
 {
 GLOBAL void
 Conn_SetFlag( CONN_ID Idx, int Flag )
 {
@@ -141,7 +135,6 @@ Conn_SetFlag( CONN_ID Idx, int Flag )
        My_Connections[Idx].flag = Flag;
 } /* Conn_SetFlag */
 
        My_Connections[Idx].flag = Flag;
 } /* Conn_SetFlag */
 
-
 GLOBAL CONN_ID
 Conn_First( void )
 {
 GLOBAL CONN_ID
 Conn_First( void )
 {
@@ -154,7 +147,6 @@ Conn_First( void )
        return NONE;
 } /* Conn_First */
 
        return NONE;
 } /* Conn_First */
 
-
 GLOBAL CONN_ID
 Conn_Next( CONN_ID Idx )
 {
 GLOBAL CONN_ID
 Conn_Next( CONN_ID Idx )
 {
@@ -169,7 +161,6 @@ Conn_Next( CONN_ID Idx )
        return NONE;
 } /* Conn_Next */
 
        return NONE;
 } /* Conn_Next */
 
-
 GLOBAL UINT16
 Conn_Options( CONN_ID Idx )
 {
 GLOBAL UINT16
 Conn_Options( CONN_ID Idx )
 {
@@ -177,7 +168,6 @@ Conn_Options( CONN_ID Idx )
        return My_Connections[Idx].options;
 } /* Conn_Options */
 
        return My_Connections[Idx].options;
 } /* Conn_Options */
 
-
 /**
  * Set connection option.
  */
 /**
  * Set connection option.
  */
@@ -188,7 +178,6 @@ Conn_SetOption(CONN_ID Idx, int Option)
        Conn_OPTION_ADD(&My_Connections[Idx], Option);
 } /* Conn_SetOption */
 
        Conn_OPTION_ADD(&My_Connections[Idx], Option);
 } /* Conn_SetOption */
 
-
 /**
  * Get the start time of the connection.
  * The result is the start time in seconds since 1970-01-01, as reported
 /**
  * Get the start time of the connection.
  * The result is the start time in seconds since 1970-01-01, as reported
@@ -224,7 +213,6 @@ Conn_SendQ( CONN_ID Idx )
        return array_bytes(&My_Connections[Idx].wbuf);
 } /* Conn_SendQ */
 
        return array_bytes(&My_Connections[Idx].wbuf);
 } /* Conn_SendQ */
 
-
 /**
  * return number of messages sent on this connection so far
  */
 /**
  * return number of messages sent on this connection so far
  */
@@ -236,7 +224,6 @@ Conn_SendMsg( CONN_ID Idx )
        return My_Connections[Idx].msg_out;
 } /* Conn_SendMsg */
 
        return My_Connections[Idx].msg_out;
 } /* Conn_SendMsg */
 
-
 /**
  * return number of (uncompressed) bytes sent
  * on this connection so far
 /**
  * return number of (uncompressed) bytes sent
  * on this connection so far
@@ -248,7 +235,6 @@ Conn_SendBytes( CONN_ID Idx )
        return My_Connections[Idx].bytes_out;
 } /* Conn_SendBytes */
 
        return My_Connections[Idx].bytes_out;
 } /* Conn_SendBytes */
 
-
 /**
  * return number of bytes pending in read buffer
  */
 /**
  * return number of bytes pending in read buffer
  */
@@ -264,7 +250,6 @@ Conn_RecvQ( CONN_ID Idx )
        return array_bytes(&My_Connections[Idx].rbuf);
 } /* Conn_RecvQ */
 
        return array_bytes(&My_Connections[Idx].rbuf);
 } /* Conn_RecvQ */
 
-
 /**
  * return number of messages received on this connection so far
  */
 /**
  * return number of messages received on this connection so far
  */
@@ -275,7 +260,6 @@ Conn_RecvMsg( CONN_ID Idx )
        return My_Connections[Idx].msg_in;
 } /* Conn_RecvMsg */
 
        return My_Connections[Idx].msg_in;
 } /* Conn_RecvMsg */
 
-
 /**
  * return number of (uncompressed) bytes received on this
  * connection so far
 /**
  * return number of (uncompressed) bytes received on this
  * connection so far
@@ -297,19 +281,16 @@ Conn_IPA(CONN_ID Idx)
        return ng_ipaddr_tostr(&My_Connections[Idx].addr);
 }
 
        return ng_ipaddr_tostr(&My_Connections[Idx].addr);
 }
 
-
 GLOBAL void
 Conn_ResetWCounter( void )
 {
        WCounter = 0;
 } /* Conn_ResetWCounter */
 
 GLOBAL void
 Conn_ResetWCounter( void )
 {
        WCounter = 0;
 } /* Conn_ResetWCounter */
 
-
 GLOBAL long
 Conn_WCounter( void )
 {
        return WCounter;
 } /* Conn_WCounter */
 
 GLOBAL long
 Conn_WCounter( void )
 {
        return WCounter;
 } /* Conn_WCounter */
 
-
 /* -eof- */
 /* -eof- */
index fef568e4a17094b2513b9fbc9a722ed18a83f3d2..6056355f0d5d253b3fbac01c090d157498c72bdf 100644 (file)
@@ -84,7 +84,6 @@
 
 #define SD_LISTEN_FDS_START 3
 
 
 #define SD_LISTEN_FDS_START 3
 
-
 static bool Handle_Write PARAMS(( CONN_ID Idx ));
 static bool Conn_Write PARAMS(( CONN_ID Idx, char *Data, size_t Len ));
 static int New_Connection PARAMS(( int Sock, bool IsSSL ));
 static bool Handle_Write PARAMS(( CONN_ID Idx ));
 static bool Conn_Write PARAMS(( CONN_ID Idx, char *Data, size_t Len ));
 static int New_Connection PARAMS(( int Sock, bool IsSSL ));
@@ -100,7 +99,6 @@ static void Simple_Message PARAMS(( int Sock, const char *Msg ));
 static int NewListener PARAMS(( const char *listen_addr, UINT16 Port ));
 static void Account_Connection PARAMS((void));
 
 static int NewListener PARAMS(( const char *listen_addr, UINT16 Port ));
 static void Account_Connection PARAMS((void));
 
-
 static array My_Listeners;
 static array My_ConnArray;
 static size_t NumConnections, NumConnectionsMax, NumConnectionsAccepted;
 static array My_Listeners;
 static array My_ConnArray;
 static size_t NumConnections, NumConnectionsMax, NumConnectionsAccepted;
index 18fb6fa3288e9704589237ae49f526ec1916a6e7..32cf6cfd60b3da5783d481328c83c61d081d9de3 100644 (file)
@@ -43,7 +43,6 @@
 #include "exp.h"
 #include "log.h"
 
 #include "exp.h"
 #include "log.h"
 
-
 static bool Is_Daemon;
 
 
 static bool Is_Daemon;
 
 
index bc26e75588d05c19e12ae719e8ae4179f35eb4ca..88872f0d9102353b83e79cc6274be451acc58f45 100644 (file)
 #include "defines.h"
 #include "tool.h"
 
 #include "defines.h"
 #include "tool.h"
 
-
 /*
  * The pattern matching functions [Matche(), Matche_After_Star()] are based
  * on code of J. Kercheval. Version 1.1 has been released on 1991-03-12 as
  * "public domain": <http://c.snippets.org/snip_lister.php?fname=match.c>
  */
 
 /*
  * The pattern matching functions [Matche(), Matche_After_Star()] are based
  * on code of J. Kercheval. Version 1.1 has been released on 1991-03-12 as
  * "public domain": <http://c.snippets.org/snip_lister.php?fname=match.c>
  */
 
-
 static int Matche PARAMS(( const char *p, const char *t ));
 static int Matche_After_Star PARAMS(( const char *p, const char *t ));
 
 static int Matche PARAMS(( const char *p, const char *t ));
 static int Matche_After_Star PARAMS(( const char *p, const char *t ));
 
-
 #define MATCH_PATTERN  6       /**< bad pattern */
 #define MATCH_LITERAL  5       /**< match failure on literal match */
 #define MATCH_RANGE    4       /**< match failure on [..] construct */
 #define MATCH_PATTERN  6       /**< bad pattern */
 #define MATCH_LITERAL  5       /**< match failure on literal match */
 #define MATCH_RANGE    4       /**< match failure on [..] construct */
@@ -44,7 +41,6 @@ static int Matche_After_Star PARAMS(( const char *p, const char *t ));
 #define MATCH_END      2       /**< premature end of pattern string */
 #define MATCH_VALID    1       /**< valid match */
 
 #define MATCH_END      2       /**< premature end of pattern string */
 #define MATCH_VALID    1       /**< valid match */
 
-
 /**
  * Match string with pattern.
  *
 /**
  * Match string with pattern.
  *
@@ -59,7 +55,6 @@ Match( const char *Pattern, const char *String )
        else return false;
 } /* Match */
 
        else return false;
 } /* Match */
 
-
 /**
  * Match string with pattern case-insensitive.
  *
 /**
  * Match string with pattern case-insensitive.
  *
@@ -76,7 +71,6 @@ MatchCaseInsensitive(const char *Pattern, const char *String)
        return Match(Pattern, ngt_LowerStr(haystack));
 } /* MatchCaseInsensitive */
 
        return Match(Pattern, ngt_LowerStr(haystack));
 } /* MatchCaseInsensitive */
 
-
 /**
  * Match string with pattern case-insensitive.
  *
 /**
  * Match string with pattern case-insensitive.
  *
@@ -105,7 +99,6 @@ MatchCaseInsensitiveList(const char *Pattern, const char *String,
        return false;
 } /* MatchCaseInsensitive */
 
        return false;
 } /* MatchCaseInsensitive */
 
-
 static int
 Matche( const char *p, const char *t )
 {
 static int
 Matche( const char *p, const char *t )
 {
@@ -136,7 +129,6 @@ Matche( const char *p, const char *t )
        else return MATCH_VALID;
 } /* Matche */
 
        else return MATCH_VALID;
 } /* Matche */
 
-
 static int
 Matche_After_Star( const char *p, const char *t )
 {
 static int
 Matche_After_Star( const char *p, const char *t )
 {
@@ -186,5 +178,4 @@ Matche_After_Star( const char *p, const char *t )
        return match;
 } /* Matche_After_Star */
 
        return match;
 } /* Matche_After_Star */
 
-
 /* -eof- */
 /* -eof- */
index 05f7a7199658383cdf71eecdfcf05bffad4b9ecb..d87623309a134044bfee254429190b39a4f53f2f 100644 (file)
@@ -52,7 +52,6 @@
 #include "exp.h"
 #include "ngircd.h"
 
 #include "exp.h"
 #include "ngircd.h"
 
-
 static void Show_Version PARAMS(( void ));
 static void Show_Help PARAMS(( void ));
 
 static void Show_Version PARAMS(( void ));
 static void Show_Help PARAMS(( void ));
 
index ad7e0429acb32aca1da16b80e65d42b5322c1ac6..c5bf4bd3c22f5a4a8367b1f9600f803221431642 100644 (file)
@@ -117,7 +117,6 @@ Announce_Channel(CLIENT *Client, CHANNEL *Chan)
        return CONNECTED;
 } /* Announce_Channel */
 
        return CONNECTED;
 } /* Announce_Channel */
 
-
 /**
  * Announce new server in the network
  * @param Client New server
 /**
  * Announce new server in the network
  * @param Client New server
@@ -149,7 +148,6 @@ Announce_Server(CLIENT * Client, CLIENT * Server)
                Client_MyToken(Server), Client_Info(Server));
 } /* Announce_Server */
 
                Client_MyToken(Server), Client_Info(Server));
 } /* Announce_Server */
 
-
 #ifdef IRCPLUS
 
 /**
 #ifdef IRCPLUS
 
 /**
@@ -210,7 +208,6 @@ Synchronize_Lists(CLIENT * Client)
        return CONNECTED;
 }
 
        return CONNECTED;
 }
 
-
 /**
  * Send CHANINFO commands to a new server (inform it about existing channels).
  * @param Client New server
 /**
  * Send CHANINFO commands to a new server (inform it about existing channels).
  * @param Client New server
@@ -255,7 +252,6 @@ Send_CHANINFO(CLIENT * Client, CHANNEL * Chan)
 
 #endif /* IRCPLUS */
 
 
 #endif /* IRCPLUS */
 
-
 /**
  * Handle ENDOFMOTD (376) numeric and login remote server.
  * The peer is either an IRC server (no IRC+ protocol), or we got the
 /**
  * Handle ENDOFMOTD (376) numeric and login remote server.
  * The peer is either an IRC server (no IRC+ protocol), or we got the
@@ -349,7 +345,6 @@ IRC_Num_ENDOFMOTD(CLIENT * Client, UNUSED REQUEST * Req)
        return CONNECTED;
 } /* IRC_Num_ENDOFMOTD */
 
        return CONNECTED;
 } /* IRC_Num_ENDOFMOTD */
 
-
 /**
  * Handle ISUPPORT (005) numeric.
  */
 /**
  * Handle ISUPPORT (005) numeric.
  */
@@ -385,5 +380,4 @@ IRC_Num_ISUPPORT(CLIENT * Client, REQUEST * Req)
        return CONNECTED;
 } /* IRC_Num_ISUPPORT */
 
        return CONNECTED;
 } /* IRC_Num_ISUPPORT */
 
-
 /* -eof- */
 /* -eof- */
index 868c17ae5b880509dc191d808f1fe3f3d541bf5b..6738d535111c8bc6e30e1968956cbc2ae068c099 100644 (file)
@@ -56,7 +56,6 @@ Op_NoPrivileges(CLIENT * Client, REQUEST * Req)
        }
 } /* Op_NoPrivileges */
 
        }
 } /* Op_NoPrivileges */
 
-
 /**
  * Check that the originator of a request is an IRC operator and allowed
  * to administer this server.
 /**
  * Check that the originator of a request is an IRC operator and allowed
  * to administer this server.
@@ -94,5 +93,4 @@ Op_Check(CLIENT * Client, REQUEST * Req)
        return c;
 } /* Op_Check */
 
        return c;
 } /* Op_Check */
 
-
 /* -eof- */
 /* -eof- */
index a968a3b9bd924fbbe6e04eee47d1dc5f4f925e21..e30262d8e5d8914087c169150f58c2f0c07910c7 100644 (file)
@@ -63,7 +63,6 @@
 # endif
 #endif
 
 # endif
 #endif
 
-
 /* datatypes */
 
 #ifndef PROTOTYPES
 /* datatypes */
 
 #ifndef PROTOTYPES
@@ -109,14 +108,12 @@ typedef unsigned char bool;
 #undef GLOBAL
 #define GLOBAL
 
 #undef GLOBAL
 #define GLOBAL
 
-
 /* SPLint */
 
 #ifdef S_SPLINT_S
 #include "splint.h"
 #endif
 
 /* SPLint */
 
 #ifdef S_SPLINT_S
 #include "splint.h"
 #endif
 
-
 /* target constants  */
 
 #ifndef HOST_OS
 /* target constants  */
 
 #ifndef HOST_OS
@@ -182,8 +179,6 @@ extern int vsnprintf PARAMS(( char *str, size_t count, const char *fmt, va_list
 #define PACKAGE_VERSION VERSION
 #endif
 
 #define PACKAGE_VERSION VERSION
 #endif
 
-
 #endif
 
 #endif
 
-
 /* -eof- */
 /* -eof- */
index ae2018bcf940a3c47a1cc265740c58fbff70dce8..ce90a423ad19b7af2158ccad1463db6aa67a1c09 100644 (file)
@@ -52,7 +52,6 @@ strlcat( char *dst, const char *src, size_t size )
 
 #endif
 
 
 #endif
 
-
 #ifndef HAVE_STRLCPY
 
 GLOBAL size_t
 #ifndef HAVE_STRLCPY
 
 GLOBAL size_t
@@ -74,5 +73,4 @@ strlcpy( char *dst, const char *src, size_t size )
 
 #endif
 
 
 #endif
 
-
 /* -eof- */
 /* -eof- */
index d6e01c943299e9b696731b182d3893bb2686b148..578f324cea9ec8830e19ff80863ca2d4752299d3 100644 (file)
@@ -30,8 +30,8 @@ strndup(const char *s, size_t maxlen)
        dup = malloc(len);
        if (dup)
                strlcpy(dup, s, len);
        dup = malloc(len);
        if (dup)
                strlcpy(dup, s, len);
+
        return dup;
 }
 
 #endif
        return dup;
 }
 
 #endif
-