summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-standalone.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2021-09-27 16:59:49 +0200
committerPhil Sutter <phil@nwl.cc>2021-10-20 11:32:54 +0200
commit0687852da7ed0a7ec8ebc88b41031dcae18c8898 (patch)
treef91580a095e6e32d929322d69a60de0bd98ca552 /iptables/xtables-standalone.c
parentdded8ff3878ba7dccb8573543f2c2c5c8670fa03 (diff)
xtables-standalone: Drop version number from init errors
Aside from the rather unconventional formatting, if those initialization functions fail we've either released a completely broken iptables or the wrong libraries are chosen by the loader. In both cases, the version number is not really interesting. While being at it, fix indenting of the first exit() call. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'iptables/xtables-standalone.c')
-rw-r--r--iptables/xtables-standalone.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/iptables/xtables-standalone.c b/iptables/xtables-standalone.c
index f4d40cda..54c70c54 100644
--- a/iptables/xtables-standalone.c
+++ b/iptables/xtables-standalone.c
@@ -49,10 +49,8 @@ xtables_main(int family, const char *progname, int argc, char *argv[])
xtables_globals.program_name = progname;
ret = xtables_init_all(&xtables_globals, family);
if (ret < 0) {
- fprintf(stderr, "%s/%s Failed to initialize xtables\n",
- xtables_globals.program_name,
- xtables_globals.program_version);
- exit(1);
+ fprintf(stderr, "%s: Failed to initialize xtables\n", progname);
+ exit(1);
}
#if defined(ALL_INCLUSIVE) || defined(NO_SHARED_LIBS)
init_extensions();
@@ -61,10 +59,8 @@ xtables_main(int family, const char *progname, int argc, char *argv[])
#endif
if (nft_init(&h, family) < 0) {
- fprintf(stderr, "%s/%s Failed to initialize nft: %s\n",
- xtables_globals.program_name,
- xtables_globals.program_version,
- strerror(errno));
+ fprintf(stderr, "%s: Failed to initialize nft: %s\n",
+ xtables_globals.program_name, strerror(errno));
exit(EXIT_FAILURE);
}