diff options
author | Daniel Wagner <daniel.wagner@bmw-carit.de> | 2013-03-12 18:16:44 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-03-18 14:31:26 +0200 |
commit | d179882d6264f0a7ead2819336185e90cb41798e (patch) | |
tree | 44ab5f3f366b8ba47089d628ef51f431155cb465 /src/iptables.c | |
parent | 531284a3a5757e6fa2c656a64c7dabb9d7edbfa3 (diff) | |
download | connman-d179882d6264f0a7ead2819336185e90cb41798e.tar.gz connman-d179882d6264f0a7ead2819336185e90cb41798e.tar.bz2 connman-d179882d6264f0a7ead2819336185e90cb41798e.zip |
iptables: Rename pre_load_table() to get_table()
The second argument is not used anymore, let's remove it. The funciton
name doesn't really match to its implementation, so it's also time
to rename it.
Diffstat (limited to 'src/iptables.c')
-rw-r--r-- | src/iptables.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/iptables.c b/src/iptables.c index 1c544e5f..5e24efb0 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -1668,11 +1668,9 @@ out: return err; } -static struct connman_iptables *pre_load_table(const char *table_name, - struct connman_iptables *table) +static struct connman_iptables *get_table(const char *table_name) { - if (table != NULL) - return table; + struct connman_iptables *table; if (table_name == NULL) table_name = "filter"; @@ -2043,7 +2041,7 @@ int __connman_iptables_dump(const char *table_name) DBG("-t %s -L", table_name); - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) return -EINVAL; @@ -2059,7 +2057,7 @@ int __connman_iptables_new_chain(const char *table_name, DBG("-t %s -N %s", table_name, chain); - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) return -EINVAL; @@ -2073,7 +2071,7 @@ int __connman_iptables_delete_chain(const char *table_name, DBG("-t %s -X %s", table_name, chain); - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) return -EINVAL; @@ -2087,7 +2085,7 @@ int __connman_iptables_flush_chain(const char *table_name, DBG("-t %s -F %s", table_name, chain); - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) return -EINVAL; @@ -2102,7 +2100,7 @@ int __connman_iptables_change_policy(const char *table_name, DBG("-t %s -F %s", table_name, chain); - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) return -EINVAL; @@ -2128,7 +2126,7 @@ int __connman_iptables_append(const char *table_name, if (err < 0) goto out; - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) { err = -EINVAL; goto out; @@ -2171,7 +2169,7 @@ int __connman_iptables_delete(const char *table_name, if (err < 0) goto out; - table = pre_load_table(table_name, NULL); + table = get_table(table_name); if (table == NULL) { err = -EINVAL; goto out; @@ -2263,7 +2261,7 @@ void flush_table(const char *name) GSList *chains = NULL, *list; struct connman_iptables *table; - table = pre_load_table(name, NULL); + table = get_table(name); if (table == NULL) return; |