Skip to content

Commit

Permalink
clock: Fix coding style within a helper function.
Browse files Browse the repository at this point in the history
No functional changes.

Signed-off-by: Richard Cochran <[email protected]>
  • Loading branch information
richardcochran committed Oct 16, 2016
1 parent c8b5257 commit 6b99df2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b99df2

Please sign in to comment.