summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2017-02-27 23:16:09 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2017-02-28 00:33:02 +0100
commitfff9e69d84717a0d270733dafdea09706408d205 (patch)
tree374d5e67e43a9368a856afbf8400c8ce81dcf365 /src
parent7969b0d98447a0659c046f3016838add5588efbd (diff)
src: rename set_keytype_alloc() to set_datatype_alloc()
This function can be used either side of the map, so rename it to something generic. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/datatype.c6
-rw-r--r--src/evaluate.c2
-rw-r--r--src/netlink.c2
-rw-r--r--src/rule.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/datatype.c b/src/datatype.c
index 64b8b884..6b1dd4a0 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -1029,8 +1029,8 @@ void concat_type_destroy(const struct datatype *dtype)
dtype_free(dtype);
}
-const struct datatype *set_keytype_alloc(const struct datatype *orig_dtype,
- unsigned int byteorder)
+const struct datatype *set_datatype_alloc(const struct datatype *orig_dtype,
+ unsigned int byteorder)
{
struct datatype *dtype;
@@ -1044,7 +1044,7 @@ const struct datatype *set_keytype_alloc(const struct datatype *orig_dtype,
return dtype;
}
-void set_keytype_destroy(const struct datatype *dtype)
+void set_datatype_destroy(const struct datatype *dtype)
{
if (dtype->flags & DTYPE_F_CLONE)
dtype_free(dtype);
diff --git a/src/evaluate.c b/src/evaluate.c
index 21f1a475..07a61180 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -73,7 +73,7 @@ static struct expr *implicit_set_declaration(struct eval_ctx *ctx,
set = set_alloc(&expr->location);
set->flags = NFT_SET_ANONYMOUS | expr->set_flags;
set->handle.set = xstrdup(name),
- set->keytype = set_keytype_alloc(keytype, keybyteorder);
+ set->keytype = set_datatype_alloc(keytype, keybyteorder);
set->keylen = keylen;
set->init = expr;
diff --git a/src/netlink.c b/src/netlink.c
index 1f339822..60d86d61 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -1189,7 +1189,7 @@ static struct set *netlink_delinearize_set(struct netlink_ctx *ctx,
set->handle.table = xstrdup(nftnl_set_get_str(nls, NFTNL_SET_TABLE));
set->handle.set = xstrdup(nftnl_set_get_str(nls, NFTNL_SET_NAME));
- set->keytype = set_keytype_alloc(keytype, byteorder);
+ set->keytype = set_datatype_alloc(keytype, byteorder);
set->keylen = nftnl_set_get_u32(nls, NFTNL_SET_KEY_LEN) * BITS_PER_BYTE;
set->flags = nftnl_set_get_u32(nls, NFTNL_SET_FLAGS);
diff --git a/src/rule.c b/src/rule.c
index b47076f0..60457477 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -210,7 +210,7 @@ void set_free(struct set *set)
if (set->init != NULL)
expr_free(set->init);
handle_free(&set->handle);
- set_keytype_destroy(set->keytype);
+ set_datatype_destroy(set->keytype);
xfree(set);
}