From 1e19ce204a1f1ab2e2ae704c21a9a4c7b14f217c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 12 Mar 2018 12:36:33 +0000 Subject: [PATCH] port: Remove unnecessary conversions from tmv_t to int64_t Signed-off-by: Michael Brown --- 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;