port: Remove unnecessary conversions from tmv_t to int64_t

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
master
Michael Brown 2018-03-12 12:36:33 +00:00 committed by Richard Cochran
parent 73c59e83d9
commit 1e19ce204a
1 changed files with 1 additions and 4 deletions

5
port.c
View File

@ -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) 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 * NB - If the sk_check_fupsync option is not enabled, then
* both of these time stamps will be zero. * both of these time stamps will be zero.
*/ */
if (tfup < tsync) { if (tmv_cmp(fup->hwts.sw, sync->hwts.sw) < 0) {
return 0; return 0;
} }
return 1; return 1;