We always but braces around 'if' blocks.

Signed-off-by: Anders Selhammer <anders.selham...@est.tech>
---
 port.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/port.c b/port.c
index 2edfb26..5f333be 100644
--- a/port.c
+++ b/port.c
@@ -1347,12 +1347,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;
 
@@ -1836,12 +1838,15 @@ static void process_delay_resp(struct port *p, struct 
ptp_message *m)
 
        master = clock_parent_identity(p->clock);
 
-       if (p->state != PS_UNCALIBRATED && p->state != PS_SLAVE)
+       if (p->state != PS_UNCALIBRATED && p->state != PS_SLAVE) {
                return;
-       if (!pid_eq(&rsp->requestingPortIdentity, &p->portIdentity))
+       }
+       if (!pid_eq(&rsp->requestingPortIdentity, &p->portIdentity)) {
                return;
-       if (!pid_eq(&master, &m->header.sourcePortIdentity))
+       }
+       if (!pid_eq(&master, &m->header.sourcePortIdentity)) {
                return;
+       }
        TAILQ_FOREACH(req, &p->delay_req, list) {
                if (rsp->hdr.sequenceId == 
ntohs(req->delay_req.hdr.sequenceId)) {
                        break;
-- 
1.8.3.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to