From 6b99df29e050110b1d625d3448621cd4df6501e6 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Fri, 29 Jul 2016 15:39:25 +0200 Subject: [PATCH] clock: Fix coding style within a helper function. No functional changes. Signed-off-by: Richard Cochran --- 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;