From 09c39eeca9a525447435d3e1766a7350c730f0f8 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Mon, 7 May 2018 17:29:48 -0400 Subject: [PATCH] Use the the peer table iterator correctly --- trp/trp_ptable_encoders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.1.4