diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:43:45 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:43:45 +0200 |
commit | ba35b0f818cadc354aba3efe373f21939249c6ed (patch) | |
tree | 575ce2dae0801c765eec8a3ab2ec8f0dfb2cfcf0 /filter/data.c | |
parent | 54344f15f8a6a6f5f0388097a1825a9c08c17482 (diff) | |
parent | 0e1e632f70b74cf111f08175ab3634db2f962579 (diff) |
Merge commit '0e1e632f70b74cf111f08175ab3634db2f962579' into haugesund
Diffstat (limited to 'filter/data.c')
-rw-r--r-- | filter/data.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/filter/data.c b/filter/data.c index c3f8bf57..feb8c8bb 100644 --- a/filter/data.c +++ b/filter/data.c @@ -93,14 +93,6 @@ const struct f_val f_const_empty_path = { .val.ad = &null_adata, }; -static struct adata * -adata_empty(struct linpool *pool, int l) -{ - struct adata *res = lp_alloc(pool, sizeof(struct adata) + l); - res->length = l; - return res; -} - static void pm_format(const struct f_path_mask *p, buffer *buf) { @@ -423,7 +415,7 @@ clist_filter(struct linpool *pool, const struct adata *list, const struct f_val if (nl == list->length) return list; - struct adata *res = adata_empty(pool, nl); + struct adata *res = lp_alloc_adata(pool, nl); memcpy(res->data, tmp, nl); return res; } @@ -457,7 +449,7 @@ eclist_filter(struct linpool *pool, const struct adata *list, const struct f_val if (nl == list->length) return list; - struct adata *res = adata_empty(pool, nl); + struct adata *res = lp_alloc_adata(pool, nl); memcpy(res->data, tmp, nl); return res; } @@ -489,7 +481,7 @@ lclist_filter(struct linpool *pool, const struct adata *list, const struct f_val if (nl == list->length) return list; - struct adata *res = adata_empty(pool, nl); + struct adata *res = lp_alloc_adata(pool, nl); memcpy(res->data, tmp, nl); return res; } |