Signed-off-by: Michael Brown <mbr...@fensystems.co.uk>
---
 port.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/port.c b/port.c
index 1b8149f..8191e77 100644
--- a/port.c
+++ b/port.c
@@ -549,14 +549,11 @@ static void free_foreign_masters(struct port *p)
 
 static int fup_sync_ok(struct ptp_message *fup, struct ptp_message *sync)
 {
-       int64_t tfup, tsync;
-       tfup = tmv_to_nanoseconds(fup->hwts.sw);
-       tsync = tmv_to_nanoseconds(sync->hwts.sw);
        /*
         * NB - If the sk_check_fupsync option is not enabled, then
         * both of these time stamps will be zero.
         */
-       if (tfup < tsync) {
+       if (tmv_cmp(fup->hwts.sw, sync->hwts.sw) < 0) {
                return 0;
        }
        return 1;
-- 
2.14.3


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