From 14a97dc5da47bd532f14109d7d381d5f33a77b0b Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Mon, 24 Jul 2017 08:21:34 +0200 Subject: [PATCH] Remove redundant test on the UTC flags. Now that we test the UTC flags in clock_update_slave(), the similar code in clock_utc_correct() is redundant. Signed-off-by: Richard Cochran --- clock.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/clock.c b/clock.c index da1fcc4..9d224c9 100644 --- a/clock.c +++ b/clock.c @@ -674,13 +674,7 @@ static int clock_utc_correct(struct clock *c, tmv_t ingress) if (!c->utc_timescale) return 0; - if (c->tds.flags & UTC_OFF_VALID && c->tds.flags & TIME_TRACEABLE) { - utc_offset = c->tds.currentUtcOffset; - } else if (c->tds.currentUtcOffset > c->utc_offset) { - utc_offset = c->tds.currentUtcOffset; - } else { - utc_offset = c->utc_offset; - } + utc_offset = c->utc_offset; if (c->tds.flags & LEAP_61) { leap = 1;