From 9320f768e22b1aac72f4fa42d9492fde57af1379 Mon Sep 17 00:00:00 2001 From: Anders Selhammer Date: Wed, 21 Mar 2018 20:24:25 +0100 Subject: [PATCH] port: Fix coding style We always but braces around 'if' blocks. Signed-off-by: Anders Selhammer --- port.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/port.c b/port.c index 8191e77..635676d 100644 --- a/port.c +++ b/port.c @@ -1331,12 +1331,14 @@ static int port_delay_request(struct port *p) p->peer_delay_fup = NULL; } - if (p->delayMechanism == DM_P2P) + if (p->delayMechanism == DM_P2P) { return port_pdelay_request(p); + } msg = msg_allocate(); - if (!msg) + if (!msg) { return -1; + } msg->hwts.type = p->timestamping; @@ -1825,14 +1827,18 @@ static void process_delay_resp(struct port *p, struct ptp_message *m) master = clock_parent_identity(p->clock); req = &p->delay_req->delay_req; - if (p->state != PS_UNCALIBRATED && p->state != PS_SLAVE) + if (p->state != PS_UNCALIBRATED && p->state != PS_SLAVE) { return; - if (!pid_eq(&rsp->requestingPortIdentity, &req->hdr.sourcePortIdentity)) + } + if (!pid_eq(&rsp->requestingPortIdentity, &req->hdr.sourcePortIdentity)) { return; - if (rsp->hdr.sequenceId != ntohs(req->hdr.sequenceId)) + } + if (rsp->hdr.sequenceId != ntohs(req->hdr.sequenceId)) { return; - if (!pid_eq(&master, &m->header.sourcePortIdentity)) + } + if (!pid_eq(&master, &m->header.sourcePortIdentity)) { return; + } c3 = correction_to_tmv(m->header.correction); t3 = p->delay_req->hwts.ts;