diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-02-01 21:38:14 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-02-01 21:38:14 +0100 |
commit | 43270796c709584b67343c333adaf28faea56265 (patch) | |
tree | 79b5f325011d8c441de3355daa379b7a0d368e83 /ip6tables.c | |
parent | ea268e19a8b820cce4bab3318e656efa51134487 (diff) |
libbxtables: prefix names and order it #1
It is good practice to prefix names in a library some way so that
it does not clash with external programs' variable names right
on the first try.
This change: rename fw_[cm]alloc to xtables_[cm]alloc and
move the definition from internal.h to xtables.h to avoid
potential compiler warnings.
These functions are intended to fix Jamal's dependency problem in
his tc's ipt action.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'ip6tables.c')
-rw-r--r-- | ip6tables.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ip6tables.c b/ip6tables.c index 3c45c072..59c10115 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -939,7 +939,7 @@ make_delete_mask(struct ip6t_entry *fw, struct ip6tables_rule_match *matches) for (matchp = matches; matchp; matchp = matchp->next) size += IP6T_ALIGN(sizeof(struct ip6t_entry_match)) + matchp->match->size; - mask = fw_calloc(1, size + mask = xtables_calloc(1, size + IP6T_ALIGN(sizeof(struct ip6t_entry_target)) + xtables_targets->size); @@ -1005,7 +1005,7 @@ for_each_chain(int (*fn)(const ip6t_chainlabel, int, struct ip6tc_handle *), chain = ip6tc_next_chain(handle); } - chains = fw_malloc(sizeof(ip6t_chainlabel) * chaincount); + chains = xtables_malloc(sizeof(ip6t_chainlabel) * chaincount); i = 0; chain = ip6tc_first_chain(handle); while (chain) { @@ -1371,7 +1371,7 @@ generate_entry(const struct ip6t_entry *fw, for (matchp = matches; matchp; matchp = matchp->next) size += matchp->match->m->u.match_size; - e = fw_malloc(size + target->u.target_size); + e = xtables_malloc(size + target->u.target_size); *e = *fw; e->target_offset = size; e->next_offset = size + target->u.target_size; @@ -1674,7 +1674,7 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand size = IP6T_ALIGN(sizeof(struct ip6t_entry_target)) + target->size; - target->t = fw_calloc(1, size); + target->t = xtables_calloc(1, size); target->t->u.target_size = size; strcpy(target->t->u.user.name, jumpto); set_revision(target->t->u.user.name, @@ -1726,7 +1726,7 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand m = find_match(optarg, LOAD_MUST_SUCCEED, &matches); size = IP6T_ALIGN(sizeof(struct ip6t_entry_match)) + m->size; - m->m = fw_calloc(1, size); + m->m = xtables_calloc(1, size); m->m->u.match_size = size; strcpy(m->m->u.user.name, m->name); set_revision(m->m->u.user.name, m->revision); @@ -1873,7 +1873,7 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand size = IP6T_ALIGN(sizeof(struct ip6t_entry_match)) + m->size; - m->m = fw_calloc(1, size); + m->m = xtables_calloc(1, size); m->m->u.match_size = size; strcpy(m->m->u.user.name, m->name); set_revision(m->m->u.user.name, @@ -2022,7 +2022,7 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand size = sizeof(struct ip6t_entry_target) + target->size; - target->t = fw_calloc(1, size); + target->t = xtables_calloc(1, size); target->t->u.target_size = size; strcpy(target->t->u.user.name, jumpto); if (target->init != NULL) |