diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 16:52:38 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 16:52:38 +0200 |
commit | 8b4b7c6eaefff43508179b05acbc061fa6b19291 (patch) | |
tree | f341aa39cc7fcf05280def678db764361295bb3d /filter | |
parent | b7e2edd4419fecb09b8690f8731e172f0c24789c (diff) | |
parent | cf07d8ad79273a3bbf0617c17e438602e4b64ece (diff) |
Merge commit 'cf07d8ad79273a3bbf0617c17e438602e4b64ece' into haugesund
Diffstat (limited to 'filter')
-rw-r--r-- | filter/f-inst.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/filter/f-inst.c b/filter/f-inst.c index 0c09208a..73a57473 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -696,21 +696,13 @@ DYNAMIC_ATTR; ARG_TYPE(1, da.type); { - struct ea_list *l = tmp_alloc(sizeof(struct ea_list) + sizeof(eattr)); - - l->next = NULL; - l->flags = EALF_SORTED; - l->count = 1; - l->attrs[0].id = da.ea_code; - l->attrs[0].flags = 0; - l->attrs[0].type = da.type; - l->attrs[0].originated = 1; - l->attrs[0].fresh = 1; - l->attrs[0].undef = 0; + struct eattr *a; if (da.type >= EAF_TYPE__MAX) bug("Unsupported attribute type"); + f_rta_cow(fs); + switch (da.type) { case T_OPAQUE: case T_IFACE: @@ -718,18 +710,18 @@ break; case T_IP: - l->attrs[0].u.ptr = tmp_store_adata(&v1.val.ip, sizeof(ip_addr)); + a = ea_set_attr(fs->eattrs, + EA_LITERAL_STORE_ADATA(da.ea_code, da.type, 0, &v1.val.ip, sizeof(ip_addr))); break; default: - l->attrs[0].u = v1.val.bval; + a = ea_set_attr(fs->eattrs, + EA_LITERAL_GENERIC(da.ea_code, da.type, 0, .u = v1.val.bval)); break; - } - f_rta_cow(fs); - l->next = *fs->eattrs; - *fs->eattrs = l; + a->originated = 1; + a->fresh = 1; } } |