mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-31 03:34:29 +01:00
common: tal_dup_talarr() helper.
This is a common thing to do, so create a macro. Unfortunately, it still needs the type arg, because the paramter may be const, and the return cannot be, and C doesn't have a general "(-const)" cast. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -214,8 +214,7 @@ static bool check_params(struct param *params)
|
||||
return false;
|
||||
|
||||
/* duplicate so we can sort */
|
||||
struct param *copy = tal_dup_arr(params, struct param,
|
||||
params, tal_count(params), 0);
|
||||
struct param *copy = tal_dup_talarr(params, struct param, params);
|
||||
|
||||
/* check for repeated names and args */
|
||||
if (!check_unique(copy, comp_by_name))
|
||||
|
||||
Reference in New Issue
Block a user