summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-09-17 12:45:34 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2008-09-17 12:45:34 +0200
commitbfa809f6c809f30706a9718506e7a575d44052a6 (patch)
treed1e7461dea683b67edd4b0b4429a668848e78d5b /src/main.c
parent587a85e0603d514656a434d44c82d1fdacd5e326 (diff)
downloadconntrack-tools-bfa809f6c809f30706a9718506e7a575d44052a6.tar.gz
conntrack-tools-bfa809f6c809f30706a9718506e7a575d44052a6.zip
cleanup: Linux kernel version checking
Minor cleanup to save a couple of lines in the Linux kernel version checking. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index a4c5451..7360b77 100644
--- a/src/main.c
+++ b/src/main.c
@@ -90,12 +90,7 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
sscanf(u.release, "%d.%d.%d", &version, &major, &minor);
- if (version < 2 && major < 6) {
- fprintf(stderr, "Linux kernel version must be >= 2.6.18\n");
- exit(EXIT_FAILURE);
- }
-
- if (major == 6 && minor < 18) {
+ if (version < 2 && major < 6 && minor < 18) {
fprintf(stderr, "Linux kernel version must be >= 2.6.18\n");
exit(EXIT_FAILURE);
}