From: Jennifer Richards Date: Mon, 7 May 2018 21:29:48 +0000 (-0400) Subject: Use the the peer table iterator correctly X-Git-Tag: 3.4.0~1^2~27 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=09c39eeca9a525447435d3e1766a7350c730f0f8 Use the the peer table iterator correctly --- diff --git a/trp/trp_ptable_encoders.c b/trp/trp_ptable_encoders.c index ea97a10..db2658c 100644 --- a/trp/trp_ptable_encoders.c +++ b/trp/trp_ptable_encoders.c @@ -62,7 +62,7 @@ json_t *trp_ptable_to_json(TRP_PTABLE *ptbl) json_t *ptbl_json = json_array(); TRP_PEER *peer = NULL; - for (trp_ptable_iter_first(iter, ptbl); + for (peer = trp_ptable_iter_first(iter, ptbl); peer != NULL; peer = trp_ptable_iter_next(iter)) { json_array_append_new(ptbl_json, trp_peer_to_json(peer));