From de86040b2cf4ec9bfbb64f0e208a19d4d7e51adc Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sun, 10 Apr 2022 14:11:46 +0200 Subject: Attribute list normalization cleanup --- filter/f-inst.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'filter') diff --git a/filter/f-inst.c b/filter/f-inst.c index e0bad833..7b3db1c7 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -717,12 +717,8 @@ runtime( "Setting opaque attribute is not allowed" ); break; - case T_IP:; - int len = sizeof(ip_addr); - struct adata *ad = lp_alloc(fs->pool, sizeof(struct adata) + len); - ad->length = len; - (* (ip_addr *) ad->data) = v1.val.ip; - l->attrs[0].u.ptr = ad; + case T_IP: + l->attrs[0].u.ptr = lp_store_adata(fs->pool, &v1.val.ip, sizeof(ip_addr)); break; default: -- cgit v1.2.3