summaryrefslogtreecommitdiffstats
path: root/src/test/test-firewall-util.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-06-19 13:33:19 +0200
committerLennart Poettering <lennart@poettering.net>2020-12-03 11:04:46 +0100
commit67b3732a533a55968727ff52bbce789e9f88501c (patch)
tree18b337e4b09280d6287de50ca45a42c767ddc287 /src/test/test-firewall-util.c
parentMerge pull request #17830 from yuwata/update-kernel-headers (diff)
downloadsystemd-67b3732a533a55968727ff52bbce789e9f88501c.tar.xz
systemd-67b3732a533a55968727ff52bbce789e9f88501c.zip
fw_add_local_dnat: remove unused function arguments
All users pass a NULL/0 for those, things haven't changed since 2015 when this was added originally, so remove the arguments. THe paramters are re-added as local function variables, initalised to NULL or 0. A followup patch can then manually remove all if (NULL) rather than leaving dead-branch optimization to compiler. Reason for not doing it here is to ease patch review. Not requiring support for this will ease initial nftables backend implementation. In case a use-case comues up later this feature can be re-added.
Diffstat (limited to 'src/test/test-firewall-util.c')
-rw-r--r--src/test/test-firewall-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-firewall-util.c b/src/test/test-firewall-util.c
index 64616e4391..479669fe45 100644
--- a/src/test/test-firewall-util.c
+++ b/src/test/test-firewall-util.c
@@ -22,19 +22,19 @@ int main(int argc, char *argv[]) {
if (r < 0)
log_error_errno(r, "Failed to modify firewall: %m");
- r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
+ r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
if (r < 0)
log_error_errno(r, "Failed to modify firewall: %m");
- r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
+ r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 4), 815, NULL);
if (r < 0)
log_error_errno(r, "Failed to modify firewall: %m");
- r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, &MAKE_IN_ADDR_UNION(1, 2, 3, 4));
+ r = fw_add_local_dnat(true, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, &MAKE_IN_ADDR_UNION(1, 2, 3, 4));
if (r < 0)
log_error_errno(r, "Failed to modify firewall: %m");
- r = fw_add_local_dnat(false, AF_INET, IPPROTO_TCP, NULL, NULL, 0, NULL, 0, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, NULL);
+ r = fw_add_local_dnat(false, AF_INET, IPPROTO_TCP, 4711, &MAKE_IN_ADDR_UNION(1, 2, 3, 5), 815, NULL);
if (r < 0)
log_error_errno(r, "Failed to modify firewall: %m");