From: Miroslav Lichvar Date: Wed, 10 Feb 2021 12:35:51 +0000 (+0100) Subject: ntp: simplify NSR_Finalise() X-Git-Tag: 4.1-pre1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27641876c57348e700acc31ef618723a19e4502e;p=thirdparty%2Fchrony.git ntp: simplify NSR_Finalise() --- diff --git a/ntp_sources.c b/ntp_sources.c index 8c5f6138..c80f09c6 100644 --- a/ntp_sources.c +++ b/ntp_sources.c @@ -198,14 +198,7 @@ NSR_Initialise(void) void NSR_Finalise(void) { - SourceRecord *record; - unsigned int i; - - for (i = 0; i < ARR_GetSize(records); i++) { - record = get_record(i); - if (record->remote_addr) - clean_source_record(record); - } + NSR_RemoveAllSources(); LCL_RemoveParameterChangeHandler(slew_sources, NULL);