Reduce the expression !(x < y) to (x >= y).

While we're at it, clean the coding style as well.

Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
---
 pmc_agent.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pmc_agent.c b/pmc_agent.c
index cfe1b4b..528d4ee 100644
--- a/pmc_agent.c
+++ b/pmc_agent.c
@@ -351,12 +351,13 @@ int update_pmc_node(struct pmc_agent *node)
        }
        ts = tp.tv_sec * NS_PER_SEC + tp.tv_nsec;
 
-       if (!(ts - node->pmc_last_update < PMC_UPDATE_INTERVAL)) {
+       if (ts - node->pmc_last_update >= PMC_UPDATE_INTERVAL) {
                if (node->subscription_active) {
                        renew_subscription(node, 0);
                }
-               if (run_pmc_get_utc_offset(node, 0) > 0)
+               if (run_pmc_get_utc_offset(node, 0) > 0) {
                        node->pmc_last_update = ts;
+               }
        }
 
        return 0;
-- 
2.20.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to