summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-15 14:00:14 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-15 14:00:14 +0000
commit82290b2b0bd2ebb5539b61b98e993ae807c2e8d7 (patch)
tree6f5cddfcc4c64a6a1cf3af96144271727be8e2f6 /src/main.c
parenta1728b3d5fd0b417941b7114de2fa9384ece5a35 (diff)
downloadconntrack-tools-82290b2b0bd2ebb5539b61b98e993ae807c2e8d7.tar.gz
conntrack-tools-82290b2b0bd2ebb5539b61b98e993ae807c2e8d7.zip
Max Kellermann <max@duempel.org>:
Fix tons of gcc warnings
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 2497a7f..11974ff 100644
--- a/src/main.c
+++ b/src/main.c
@@ -28,6 +28,9 @@
#include "hash.h"
#include "jhash.h"
+#undef _POSIX_SOURCE
+#include <sys/capability.h>
+
struct ct_general_state st;
union ct_state state;
@@ -52,7 +55,8 @@ static const char usage_options[] =
"Options:\n"
" -C [configfile], configuration file path\n";
-void show_usage(char *progname)
+static void
+show_usage(char *progname)
{
fprintf(stdout, "Connection tracking userspace daemon v%s\n", VERSION);
fprintf(stdout, "Usage: %s [commands] [options]\n\n", progname);
@@ -61,7 +65,8 @@ void show_usage(char *progname)
fprintf(stdout, "%s\n", usage_options);
}
-void set_operation_mode(int *current, int want, char *argv[])
+static void
+set_operation_mode(int *current, int want, char *argv[])
{
if (*current == NOT_SET) {
*current = want;
@@ -109,7 +114,7 @@ static int check_capabilities(void)
int main(int argc, char *argv[])
{
- int ret, i, config_set = 0, action;
+ int ret, i, config_set = 0, action = -1;
char config_file[PATH_MAX];
int type = 0;
struct utsname u;
@@ -305,4 +310,5 @@ int main(int argc, char *argv[])
* run main process
*/
run();
+ return 0;
}