clock: Fix coding style within a helper function.

No functional changes.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2016-07-29 15:39:25 +02:00
parent c8b525755b
commit 6b99df29e0
1 changed files with 8 additions and 6 deletions

14
clock.c
View File

@ -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;