summaryrefslogtreecommitdiffstats
path: root/qa
diff options
context:
space:
mode:
Diffstat (limited to 'qa')
-rw-r--r--qa/test_api.c9
-rw-r--r--qa/test_filter.c6
2 files changed, 10 insertions, 5 deletions
diff --git a/qa/test_api.c b/qa/test_api.c
index eda9d49..e7a8453 100644
--- a/qa/test_api.c
+++ b/qa/test_api.c
@@ -4,6 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
@@ -13,14 +14,14 @@
* this file contains a test to check the set/get/copy/cmp APIs.
*/
-static eval_sigterm(int status)
+static void eval_sigterm(int status)
{
switch(WTERMSIG(status)) {
case SIGSEGV:
printf("received SIGSEV\n");
break;
case 0:
- printf("OK\n", WTERMSIG(status));
+ printf("OK\n");
break;
default:
printf("exited with signal: %d\n", WTERMSIG(status));
@@ -28,10 +29,9 @@ static eval_sigterm(int status)
}
}
-int main()
+int main(void)
{
int ret, i;
- struct nfct_handle *h;
struct nf_conntrack *ct, *tmp;
char data[32];
int status;
@@ -99,4 +99,5 @@ int main()
nfct_destroy(ct);
nfct_destroy(tmp);
+ return EXIT_SUCCESS;
}
diff --git a/qa/test_filter.c b/qa/test_filter.c
index 35fdbec..7877819 100644
--- a/qa/test_filter.c
+++ b/qa/test_filter.c
@@ -3,6 +3,9 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <arpa/inet.h>
#include <errno.h>
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
@@ -23,7 +26,7 @@ static int event_cb(enum nf_conntrack_msg_type type,
return NFCT_CB_CONTINUE;
}
-int main()
+int main(void)
{
int i, ret;
struct nfct_handle *h;
@@ -72,4 +75,5 @@ int main()
ret = nfct_catch(h);
printf("test ret=%d (%s)\n", ret, strerror(errno));
+ return EXIT_SUCCESS;
}