peer_control: annotate feature bitfields as being taken.

Because tal_dup_arr takes, this does too.

Suggested-by: @cdecker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-25 10:03:10 +09:30
parent f2e0c35916
commit 641b33349b
2 changed files with 2 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ static void copy_to_parent_log(const char *prefix,
struct peer *new_peer(struct lightningd *ld, u64 dbid,
const struct pubkey *id,
const struct wireaddr_internal *addr,
const u8 *gfeatures, const u8 *lfeatures)
const u8 *gfeatures TAKES, const u8 *lfeatures TAKES)
{
/* We are owned by our channels, and freed manually by destroy_channel */
struct peer *peer = tal(NULL, struct peer);

View File

@@ -58,7 +58,7 @@ struct peer *find_peer_by_dbid(struct lightningd *ld, u64 dbid);
struct peer *new_peer(struct lightningd *ld, u64 dbid,
const struct pubkey *id,
const struct wireaddr_internal *addr,
const u8 *gfeatures, const u8 *lfeatures);
const u8 *gfeatures TAKES, const u8 *lfeatures TAKES);
/* Also removes from db. */
void delete_peer(struct peer *peer);