clock: Fix coding style within a helper function.
No functional changes. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
c8b525755b
commit
6b99df29e0
14
clock.c
14
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;
|
||||
|
|
Loading…
Reference in New Issue