diff --git a/src/packetq.cpp b/src/packetq.cpp index 6a6cd67..3a56fd5 100644 --- a/src/packetq.cpp +++ b/src/packetq.cpp @@ -139,7 +139,7 @@ int getopt_long(int argc, char* argv[], const char* str, option* opt, int* optio void sigproc(int sig) { - //ignore sig pipe + // ignore sig pipe signal(SIGPIPE, sigproc); } diff --git a/src/pcap.h b/src/pcap.h index ab09938..26bef6a 100644 --- a/src/pcap.h +++ b/src/pcap.h @@ -178,7 +178,7 @@ class Pcap_file { m_packetbuffer = 0; } m_packetbuffer_len = len + 4096; - m_packetbuffer = new(std::nothrow) unsigned char[m_packetbuffer_len]; + m_packetbuffer = new (std::nothrow) unsigned char[m_packetbuffer_len]; if (!m_packetbuffer) m_packetbuffer_len = 0; } diff --git a/src/server.cpp b/src/server.cpp index 9959871..96e14d3 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -230,7 +230,7 @@ namespace httpd { } void process(bool read) { - //m_serv means this is a listening socket + // m_serv means this is a listening socket if (m_serv) return; if (!read) { @@ -1165,7 +1165,7 @@ void start_server(int port, bool fork_me, const std::string& pcaproot, const std if (cnt < max_conn) { int c = server.get_connection(); if (c > -1) { - Http_socket* s = new(std::nothrow) Http_socket(c); + Http_socket* s = new (std::nothrow) Http_socket(c); if (s && s->failed()) { syslog(LOG_ERR | LOG_USER, "failed to create socket"); delete s; diff --git a/src/sql.cpp b/src/sql.cpp index 8477fbd..25fe0c5 100644 --- a/src/sql.cpp +++ b/src/sql.cpp @@ -531,8 +531,7 @@ void Table::merge_sort(Ordering_terms& order) if (p2 + l2 > table_size) l2 = table_size - p2; - int i = start; - + i = start; while (cnt-- > 0) { if (l1 <= 0) { d[i++] = s[p2++]; @@ -2556,7 +2555,7 @@ Cc_func::Cc_func(const OP& op) } } - MMDB_s* mmdb = new(std::nothrow) MMDB_s; + MMDB_s* mmdb = new (std::nothrow) MMDB_s; if (!mmdb) { return; } @@ -2648,7 +2647,7 @@ Asn_func::Asn_func(const OP& op) } } - MMDB_s* mmdb = new(std::nothrow) MMDB_s; + MMDB_s* mmdb = new (std::nothrow) MMDB_s; if (!mmdb) { return; } diff --git a/src/sql.h b/src/sql.h index 4f0c318..98bb9ff 100644 --- a/src/sql.h +++ b/src/sql.h @@ -668,7 +668,7 @@ class OP : public Token { } m_name += ")"; } - //m_name+=")"; + // m_name+=")"; return m_name.c_str(); } Coltype::Type ret_type() { return m_t; } diff --git a/src/tcp.cpp b/src/tcp.cpp index c10ff75..09ec9a7 100644 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -130,8 +130,8 @@ class Stream { } /// add a datasegment to the stream /** If the segment has the expected sequence number - * the segment will be added to the list - */ + * the segment will be added to the list + */ void add(bool syn, unsigned int seq, Data_segment& s) { m_content = true; @@ -183,8 +183,8 @@ class Stream { } /// returns the data in the stream /** The returned data is located in a static buffer shared by all streams - * the data is valid until the next call to get_buffer() - */ + * the data is valid until the next call to get_buffer() + */ unsigned char* get_buffer() { int p = 0;