summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-11-26 00:33:06 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-11-26 00:33:06 +0100
commit3f04c0149da0a43defd8b798a8837964d2d239c6 (patch)
treec94ddaafd2bbc37a2275335f1003fc2d1571ec9d
parent90786bf4782b556cd59fbcdcf9d7a0ceec4ace9d (diff)
WIP: empty improvements
-rw-r--r--filter/config.Y1
-rw-r--r--filter/data.c4
-rw-r--r--filter/data.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/filter/config.Y b/filter/config.Y
index ee8ec096..4f857350 100644
--- a/filter/config.Y
+++ b/filter/config.Y
@@ -385,7 +385,6 @@ f_const_empty(enum f_type t)
case T_CLIST:
case T_ECLIST:
case T_LCLIST:
- case T_TLVLIST:
return f_new_inst(FI_CONSTANT, (struct f_val) {
.type = t,
.val.ad = &null_adata,
diff --git a/filter/data.c b/filter/data.c
index 105f3848..d2347684 100644
--- a/filter/data.c
+++ b/filter/data.c
@@ -93,9 +93,7 @@ f_type_element_type(enum f_type t)
const struct f_trie f_const_empty_trie = { .ipv4 = -1, };
const struct f_val f_const_empty_prefix_set = {
.type = T_PREFIX_SET,
- .val.ti = &f_const_empty_trie,
-}, f_const_empty_tlvlist = {
- .type = T_TLVLIST,
+ .val.ti = &f_const_empty_trie
};
static struct adata *
diff --git a/filter/data.h b/filter/data.h
index 4abf4835..a6923eb6 100644
--- a/filter/data.h
+++ b/filter/data.h
@@ -352,8 +352,12 @@ val_empty(enum f_type t)
case T_CLIST:
case T_ECLIST:
case T_LCLIST:
+ case T_EMPTY_LIST:
return (struct f_val) { .type = t, .val.ad = &null_adata };
+ case T_TLVLIST:
+ return (struct f_val) { .type = T_TLVLIST, .val.tl = NULL };
+
default:
return (struct f_val) { };
}