Code cleanup. Added coveralls badge
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
# nDPI
|
# nDPI
|
||||||
|
|
||||||
[](https://travis-ci.org/ntop/nDPI)
|
[](https://travis-ci.org/ntop/nDPI)
|
||||||
|
[](https://coveralls.io/github/ntop/nDPI?branch=dev)
|
||||||
|
|
||||||
## What is nDPI ?
|
## What is nDPI ?
|
||||||
|
|
||||||
|
|||||||
@@ -1293,7 +1293,7 @@ void automataUnitTest() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@brief MAIN FUNCTION
|
@brief MAIN FUNCTION
|
||||||
**/
|
**/
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@@ -1339,7 +1339,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Timezone
|
@brief Timezone
|
||||||
**/
|
**/
|
||||||
struct timezone {
|
struct timezone {
|
||||||
int tz_minuteswest; /* minutes W of Greenwich */
|
int tz_minuteswest; /* minutes W of Greenwich */
|
||||||
int tz_dsttime; /* type of dst correction */
|
int tz_dsttime; /* type of dst correction */
|
||||||
@@ -1348,7 +1348,7 @@ struct timezone {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Set time
|
@brief Set time
|
||||||
**/
|
**/
|
||||||
int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
int gettimeofday(struct timeval *tv, struct timezone *tz) {
|
||||||
FILETIME ft;
|
FILETIME ft;
|
||||||
LARGE_INTEGER li;
|
LARGE_INTEGER li;
|
||||||
|
|||||||
@@ -74,7 +74,6 @@ void ndpi_free_flow_info_half(struct ndpi_flow_info *flow) {
|
|||||||
if(flow->ndpi_flow) { ndpi_free_flow(flow->ndpi_flow); flow->ndpi_flow = NULL; }
|
if(flow->ndpi_flow) { ndpi_free_flow(flow->ndpi_flow); flow->ndpi_flow = NULL; }
|
||||||
if(flow->src_id) { ndpi_free(flow->src_id); flow->src_id = NULL; }
|
if(flow->src_id) { ndpi_free(flow->src_id); flow->src_id = NULL; }
|
||||||
if(flow->dst_id) { ndpi_free(flow->dst_id); flow->dst_id = NULL; }
|
if(flow->dst_id) { ndpi_free(flow->dst_id); flow->dst_id = NULL; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ***************************************************** */
|
/* ***************************************************** */
|
||||||
|
|||||||
+3
-3
@@ -279,7 +279,7 @@ strcasecmp(s1, s2)
|
|||||||
int
|
int
|
||||||
strncasecmp(s1, s2, n)
|
strncasecmp(s1, s2, n)
|
||||||
const char *s1, *s2;
|
const char *s1, *s2;
|
||||||
register size_t n;
|
register size_t n;
|
||||||
{
|
{
|
||||||
if(n != 0) {
|
if(n != 0) {
|
||||||
register const u_char *cm = charmap,
|
register const u_char *cm = charmap,
|
||||||
@@ -1728,7 +1728,7 @@ void ndpi_debug_printf(unsigned int proto, struct ndpi_detection_module_struct *
|
|||||||
{
|
{
|
||||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||||
va_list args;
|
va_list args;
|
||||||
#define MAX_STR_LEN 120
|
#define MAX_STR_LEN 120
|
||||||
char str[MAX_STR_LEN];
|
char str[MAX_STR_LEN];
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
vsprintf(str, format, args);
|
vsprintf(str, format, args);
|
||||||
@@ -4170,7 +4170,7 @@ void ndpi_int_reset_protocol(struct ndpi_flow_struct *flow) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NDPI_PROTOCOL_IP_clear(ndpi_ip_addr_t * ip) {
|
void NDPI_PROTOCOL_IP_clear(ndpi_ip_addr_t * ip) {
|
||||||
memset(ip, 0, sizeof(ndpi_ip_addr_t));
|
memset(ip, 0, sizeof(ndpi_ip_addr_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user