summaryrefslogtreecommitdiff
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-02-22 12:17:09 +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-02-22 12:17:09 +0000
commit5015fd45430f054d3ec4a8b4157da3506c45950f (patch)
treec3576cd29bec88b14c32c0ef294575b0d9dd411d
parent13f4c15f214dd807899c10ebdff74ab5148d650f (diff)
downloadconntrack-tools-5015fd45430f054d3ec4a8b4157da3506c45950f.tar.gz
conntrack-tools-5015fd45430f054d3ec4a8b4157da3506c45950f.zip
cleanup: remove config_set from main(), use config_file variable instead
-rw-r--r--ChangeLog1
-rw-r--r--src/main.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 411118e..588ea01 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,7 @@ o use umask() to set up file permissions
o add support for NAT sequence adjustment (requires Linux kernel >= 2.6.25)
o remove TODO file from release tarballs
o compose the file descriptor set at initialization stage to save some cycles
+o cleanup: remove config_set from main(), use config_file variable instead
Max Kellermann <max@duempel.org>:
diff --git a/src/main.c b/src/main.c
index b6011f0..2e1ccd8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -77,8 +77,8 @@ set_operation_mode(int *current, int want, char *argv[])
int main(int argc, char *argv[])
{
- int ret, i, config_set = 0, action = -1;
- char config_file[PATH_MAX];
+ int ret, i, action = -1;
+ char config_file[PATH_MAX] = {};
int type = 0;
struct utsname u;
int version, major, minor;
@@ -126,7 +126,6 @@ int main(int argc, char *argv[])
"down to %d characters",
PATH_MAX);
}
- config_set = 1;
break;
}
show_usage(argv[0]);
@@ -184,7 +183,7 @@ int main(int argc, char *argv[])
}
}
- if (config_set == 0)
+ if (!config_file[0])
strcpy(config_file, DEFAULT_CONFIGFILE);
umask(0177);