Fix compiler warning about incomplete prototype (2).

remotes/origin/master-1.0.x
Victor Julien 15 years ago
parent 18c923318a
commit 426a7de5f2

@ -43,7 +43,7 @@ IPReputationCtx *rep_ctx;
* \retval Pointer to the IPReputationCtx created * \retval Pointer to the IPReputationCtx created
* NULL Error initializing moule; * NULL Error initializing moule;
*/ */
IPReputationCtx *SCReputationInitCtx() { IPReputationCtx *SCReputationInitCtx(void) {
rep_ctx = (IPReputationCtx *)SCMalloc(sizeof(IPReputationCtx)); rep_ctx = (IPReputationCtx *)SCMalloc(sizeof(IPReputationCtx));
if (rep_ctx == NULL) if (rep_ctx == NULL)
return NULL; return NULL;
@ -83,7 +83,7 @@ IPReputationCtx *SCReputationInitCtx() {
* \retval rep_data On success, pointer to the rep_data that has to be sent * \retval rep_data On success, pointer to the rep_data that has to be sent
* along with the key, to be added to the Radix tree * along with the key, to be added to the Radix tree
*/ */
Reputation *SCReputationAllocData() Reputation *SCReputationAllocData(void)
{ {
Reputation *rep_data = NULL; Reputation *rep_data = NULL;
@ -114,7 +114,7 @@ void SCReputationFreeData(void *data)
* *
* \retval ReputationTransaction pointer On success * \retval ReputationTransaction pointer On success
*/ */
ReputationTransaction *SCReputationTransactionAlloc() ReputationTransaction *SCReputationTransactionAlloc(void)
{ {
ReputationTransaction *rtx = NULL; ReputationTransaction *rtx = NULL;
@ -230,7 +230,7 @@ Reputation *SCReputationClone(Reputation *orig)
return rep; return rep;
} }
void SCReputationFreeCtx() void SCReputationFreeCtx(IPReputationCtx *rep_ctx)
{ {
if (rep_ctx->reputationIPV4_tree != NULL) { if (rep_ctx->reputationIPV4_tree != NULL) {
SCRadixReleaseRadixTree(rep_ctx->reputationIPV4_tree); SCRadixReleaseRadixTree(rep_ctx->reputationIPV4_tree);
@ -689,7 +689,7 @@ Reputation *SCReputationUpdateIPV6Data(uint8_t *ipv6addr, ReputationTransaction
* \test Adding (from numeric ipv4) and removing host reputation in the Reputation context * \test Adding (from numeric ipv4) and removing host reputation in the Reputation context
* tree. THe reputation data is the real one, no copies here. * tree. THe reputation data is the real one, no copies here.
*/ */
int SCReputationTestIPV4AddRemoveHost01() int SCReputationTestIPV4AddRemoveHost01(void)
{ {
int i = 0; int i = 0;
struct in_addr in; struct in_addr in;
@ -799,7 +799,7 @@ error:
* \test Adding (from numeric ipv6) and removing host reputation in the Reputation context * \test Adding (from numeric ipv6) and removing host reputation in the Reputation context
* tree. THe reputation data is the real one, no copies here. * tree. THe reputation data is the real one, no copies here.
*/ */
int SCReputationTestIPV6AddRemoveHost01() int SCReputationTestIPV6AddRemoveHost01(void)
{ {
uint8_t in[16]; uint8_t in[16];
uint8_t i = 0; uint8_t i = 0;
@ -902,7 +902,7 @@ error:
* \test Adding (from numeric ipv4) and retrieving reputations * \test Adding (from numeric ipv4) and retrieving reputations
* tree. The reputation data retireved are copies of the original. * tree. The reputation data retireved are copies of the original.
*/ */
int SCReputationTestIPV4AddRemoveHost02() int SCReputationTestIPV4AddRemoveHost02(void)
{ {
int i = 0; int i = 0;
struct in_addr in; struct in_addr in;
@ -985,7 +985,7 @@ error:
* \test Adding (from numeric ipv6) and removing host reputation in the Reputation context * \test Adding (from numeric ipv6) and removing host reputation in the Reputation context
* tree. The reputation data retireved are copies of the original. * tree. The reputation data retireved are copies of the original.
*/ */
int SCReputationTestIPV6AddRemoveHost02() int SCReputationTestIPV6AddRemoveHost02(void)
{ {
int i = 0; int i = 0;
uint8_t in[16]; uint8_t in[16];
@ -1074,7 +1074,7 @@ error:
/** /**
* \test Test searches (best and exact matches) * \test Test searches (best and exact matches)
*/ */
int SCReputationTestIPV4BestExactMatch01() int SCReputationTestIPV4BestExactMatch01(void)
{ {
int i = 0; int i = 0;
struct in_addr in; struct in_addr in;
@ -1227,7 +1227,7 @@ error:
/** /**
* \test Update transactions * \test Update transactions
*/ */
int SCReputationTestIPV4Update01() int SCReputationTestIPV4Update01(void)
{ {
int i = 0; int i = 0;
struct in_addr in; struct in_addr in;
@ -1329,7 +1329,7 @@ error:
/** /**
* \test Update transactions * \test Update transactions
*/ */
int SCReputationTestIPV6Update01() int SCReputationTestIPV6Update01(void)
{ {
int i = 0; int i = 0;
uint8_t in[16]; uint8_t in[16];

@ -81,15 +81,15 @@ typedef struct ReputationTransaction_ {
uint16_t inc[REPUTATION_NUMBER]; uint16_t inc[REPUTATION_NUMBER];
uint16_t dec[REPUTATION_NUMBER]; uint16_t dec[REPUTATION_NUMBER];
uint8_t flags; uint8_t flags;
}ReputationTransaction; } ReputationTransaction;
/* API */ /* API */
Reputation *SCReputationAllocData(); Reputation *SCReputationAllocData();
Reputation *SCReputationClone(Reputation *); Reputation *SCReputationClone(Reputation *);
void SCReputationFreeData(void *); void SCReputationFreeData(void *);
IPReputationCtx *SCReputationInitCtx(); IPReputationCtx *SCReputationInitCtx(void);
void SCReputationFreeCtx(); void SCReputationFreeCtx(IPReputationCtx *);
void SCReputationPrint(Reputation *); void SCReputationPrint(Reputation *);
void SCReputationRegisterTests(void); void SCReputationRegisterTests(void);

Loading…
Cancel
Save