No functional changes. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- clock.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/clock.c b/clock.c index 55532b8..3b42109 100644 --- a/clock.c +++ b/clock.c @@ -768,20 +768,22 @@ static int clock_add_port(struct clock *c, int phc_index, { struct port *p, *piter, *lastp = NULL; - if (clock_resize_pollfd(c, c->nports + 1)) + if (clock_resize_pollfd(c, c->nports + 1)) { return -1; - p = port_open(phc_index, timestamping, ++c->last_port_number, - iface, c); + } + p = port_open(phc_index, timestamping, ++c->last_port_number, iface, c); if (!p) { /* No need to shrink pollfd */ return -1; } - LIST_FOREACH(piter, &c->ports, list) + LIST_FOREACH(piter, &c->ports, list) { lastp = piter; - if (lastp) + } + if (lastp) { LIST_INSERT_AFTER(lastp, p, list); - else + } else { LIST_INSERT_HEAD(&c->ports, p, list); + } c->nports++; clock_fda_changed(c); return 0; -- 2.1.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel