diff --git a/acquire.c b/acquire.c index af36831..0eef796 100644 --- a/acquire.c +++ b/acquire.c @@ -143,7 +143,6 @@ static SCH_TimeoutID source_start_timeout_id; void ACQ_Initialise(void) { - return; } @@ -152,7 +151,6 @@ ACQ_Initialise(void) void ACQ_Finalise(void) { - return; } /* ================================================== */ @@ -240,8 +238,6 @@ finalise_io(void) } sock_fd6 = -1; #endif - - return; } /* ================================================== */ @@ -322,8 +318,6 @@ probe_source(SourceRecord *src) ++(src->n_dead_probes); src->timer_running = 1; src->timeout_id = SCH_AddTimeoutByDelay(RETRANSMISSION_TIMEOUT, transmit_timeout, (void *) src); - - return; } /* ================================================== */ @@ -797,8 +791,6 @@ ACQ_StartAcquisition(int n, IPAddr *ip_addrs, double threshold, void (*after_hoo /* Start sampling first source */ start_next_source(); - - return; } /* ================================================== */ diff --git a/addrfilt.c b/addrfilt.c index b6ae1ae..0930289 100644 --- a/addrfilt.c +++ b/addrfilt.c @@ -116,8 +116,6 @@ close_node(TableNode *node) Free(node->extended); node->extended = NULL; } - - return; } @@ -141,7 +139,6 @@ open_node(TableNode *node) child_node->extended = NULL; } } - return; } /* ================================================== */ @@ -408,7 +405,6 @@ static void print_node(TableNode *node, uint32_t *addr, int ip_len, int shift, i print_node(sub_node, new_addr, ip_len, shift - 4, subnet_bits + 4); } } - return; } @@ -423,7 +419,6 @@ static void print_table(ADF_AuthTable table) memset(addr, 0, sizeof (addr)); printf("IPv6 table:\n"); print_node(&table->base6, addr, 4, 124, 0); - return; } /* ================================================== */ diff --git a/broadcast.c b/broadcast.c index 8a8e327..11bbcbc 100644 --- a/broadcast.c +++ b/broadcast.c @@ -49,7 +49,6 @@ static int max_destinations = 0; void BRD_Initialise(void) { - return; /* Nothing to do */ } /* ================================================== */ @@ -57,7 +56,6 @@ BRD_Initialise(void) void BRD_Finalise(void) { - return; /* Nothing to do */ } /* ================================================== */ diff --git a/client.c b/client.c index 7cd016e..7ed43ef 100644 --- a/client.c +++ b/client.c @@ -182,8 +182,6 @@ open_io(const char *hostname, int port) perror("Can't create socket"); exit(1); } - - return; } /* ================================================== */ @@ -925,7 +923,6 @@ cvt_to_sec_usec(double x, long *sec, long *usec) { *sec = s; *usec = us; - return; } /* ================================================== */ diff --git a/clientlog.c b/clientlog.c index 7666ffd..84900b4 100644 --- a/clientlog.c +++ b/clientlog.c @@ -174,7 +174,6 @@ CLG_Initialise(void) void CLG_Finalise(void) { - return; } /* ================================================== */ diff --git a/cmdmon.c b/cmdmon.c index 7c283bc..7bc2f96 100644 --- a/cmdmon.c +++ b/cmdmon.c @@ -322,7 +322,6 @@ CAM_Finalise(void) ADF_DestroyTable(access_auth_table); initialised = 0; - return; } /* ================================================== */ @@ -743,8 +742,6 @@ transmit_reply(CMD_Reply *msg, union sockaddr_in46 *where_to, int auth_len) LOG(LOGS_WARN, LOGF_CmdMon, "Could not send response to %s:%hu", UTI_IPToString(&ip), port); } - - return; } @@ -1450,7 +1447,6 @@ handle_rtcreport(CMD_Request *rx_message, CMD_Reply *tx_message) } else { tx_message->status = htons(STT_NORTC); } - return; } /* ================================================== */ @@ -1465,7 +1461,6 @@ handle_trimrtc(CMD_Request *rx_message, CMD_Reply *tx_message) } else { tx_message->status = htons(STT_NORTC); } - return; } /* ================================================== */ @@ -1476,7 +1471,6 @@ handle_cyclelogs(CMD_Request *rx_message, CMD_Reply *tx_message) LOG_CycleLogFiles(); tx_message->status = htons(STT_SUCCESS); - return; } /* ================================================== */ @@ -1524,8 +1518,6 @@ handle_subnets_accessed(CMD_Request *rx_message, CMD_Reply *tx_message) break; } } - - return; } /* ================================================== */ @@ -1684,7 +1676,6 @@ handle_make_step(CMD_Request *rx_message, CMD_Reply *tx_message) { LCL_MakeStep(0.0); tx_message->status = htons(STT_SUCCESS); - return; } /* ================================================== */ @@ -1712,7 +1703,6 @@ handle_reselect_distance(CMD_Request *rx_message, CMD_Reply *tx_message) dist = UTI_FloatNetworkToHost(rx_message->data.reselect_distance.distance); SRC_SetReselectDistance(dist); tx_message->status = htons(STT_SUCCESS); - return; } /* ================================================== */ @@ -1722,7 +1712,6 @@ handle_reselect(CMD_Request *rx_message, CMD_Reply *tx_message) { SRC_ReselectSource(); tx_message->status = htons(STT_SUCCESS); - return; } /* ================================================== */ @@ -2322,9 +2311,6 @@ read_from_cmd_socket(void *anything) do_it = ((do_it + 1) % 3); #endif } - - return; - } /* ================================================== */ diff --git a/conf.c b/conf.c index 67b3841..a9e4f93 100644 --- a/conf.c +++ b/conf.c @@ -521,9 +521,6 @@ parse_source(char *line, NTP_Source_Type type) other_parse_error("Unreadable polltarget"); break; } - - return; - } /* ================================================== */ @@ -1417,9 +1414,6 @@ CNF_AddSources(void) { } NSR_ResolveSources(); - - return; - } /* ================================================== */ @@ -1739,8 +1733,6 @@ CNF_SetupAccessRestrictions(void) LOG_FATAL(LOGF_Configure, "Bad subnet for %08lx", node->ip); } } - - return; } /* ================================================== */ diff --git a/keys.c b/keys.c index fa27440..1c14dc2 100644 --- a/keys.c +++ b/keys.c @@ -132,8 +132,6 @@ KEY_Initialise(void) if (generate_key(KEY_GetCommandKey())) KEY_Reload(); } - - return; } /* ================================================== */ @@ -141,8 +139,6 @@ KEY_Initialise(void) void KEY_Finalise(void) { - /* Nothing to do */ - return; } /* ================================================== */ diff --git a/local.c b/local.c index b300cc6..3cd1bb2 100644 --- a/local.c +++ b/local.c @@ -132,8 +132,6 @@ calculate_sys_precision(void) precision_log--; best_dusec *= 2; } - - return; } /* ================================================== */ @@ -167,7 +165,6 @@ LCL_Initialise(void) void LCL_Finalise(void) { - return; } /* ================================================== */ @@ -220,14 +217,11 @@ LCL_AddParameterChangeHandler(LCL_ParameterChangeHandler handler, void *anything new_entry->prev = change_list.prev; change_list.prev->next = new_entry; change_list.prev = new_entry; - - return; } /* ================================================== */ /* Remove a handler */ -extern void LCL_RemoveParameterChangeHandler(LCL_ParameterChangeHandler handler, void *anything) { @@ -251,8 +245,6 @@ void LCL_RemoveParameterChangeHandler(LCL_ParameterChangeHandler handler, void * ptr->prev->next = ptr->next; free(ptr); - - return; } /* ================================================== */ @@ -279,8 +271,6 @@ LCL_AddDispersionNotifyHandler(LCL_DispersionNotifyHandler handler, void *anythi new_entry->prev = dispersion_notify_list.prev; dispersion_notify_list.prev->next = new_entry; dispersion_notify_list.prev = new_entry; - - return; } /* ================================================== */ @@ -310,8 +300,6 @@ void LCL_RemoveDispersionNotifyHandler(LCL_DispersionNotifyHandler handler, void ptr->prev->next = ptr->next; free(ptr); - - return; } /* ================================================== */ @@ -577,8 +565,6 @@ lcl_RegisterSystemDrivers(lcl_ReadFrequencyDriver read_freq, #ifdef TRACEON LOG(LOGS_INFO, LOGF_Local, "Local freq=%.3fppm", current_freq_ppm); #endif - - return; } /* ================================================== */ @@ -614,8 +600,6 @@ LCL_SetLeap(int leap) if (drv_set_leap) { (drv_set_leap)(leap); } - - return; } /* ================================================== */ diff --git a/logging.c b/logging.c index a8bad6e..1d15a90 100644 --- a/logging.c +++ b/logging.c @@ -74,8 +74,6 @@ LOG_Initialise(void) #ifdef WINNT logfile = fopen("./chronyd.err", "a"); #endif - - return; } /* ================================================== */ @@ -97,7 +95,6 @@ LOG_Finalise(void) LOG_CycleLogFiles(); initialised = 0; - return; } /* ================================================== */ @@ -132,7 +129,6 @@ LOG_Line_Function(LOG_Severity severity, LOG_Facility facility, const char *form fprintf(stderr, "%s\n", buf); } #endif - return; } /* ================================================== */ @@ -163,8 +159,6 @@ LOG_Fatal_Function(LOG_Facility facility, const char *format, ...) #endif MAI_CleanupAndExit(); - - return; } /* ================================================== */ @@ -185,7 +179,6 @@ LOG_Position(const char *filename, int line_number, const char *function_name) fprintf(stderr, "%s:%d:(%s)[%s] ", filename, line_number, function_name, buf); } #endif - return; } /* ================================================== */ diff --git a/manual.c b/manual.c index c3f7797..47a4d1f 100644 --- a/manual.c +++ b/manual.c @@ -93,8 +93,6 @@ MNL_Initialise(void) error = ERROR_MARGIN; LCL_AddParameterChangeHandler(slew_samples, NULL); - - return; } /* ================================================== */ @@ -102,7 +100,6 @@ MNL_Initialise(void) void MNL_Finalise(void) { - return; } /* ================================================== */ @@ -239,7 +236,6 @@ slew_samples(struct timeval *raw, dfreq, doffset); samples[i].offset += delta_time; } - return; } /* ================================================== */ diff --git a/ntp_core.c b/ntp_core.c index e6253fa..412bbc8 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -249,8 +249,6 @@ start_initial_timeout(NCR_Instance inst) SCH_NtpSamplingClass, transmit_timeout, (void *)inst); inst->timer_running = 1; - - return; } /* ================================================== */ @@ -351,7 +349,6 @@ NCR_DestroyInstance(NCR_Instance instance) /* Free the data structure */ Free(instance); - return; } /* ================================================== */ @@ -633,9 +630,6 @@ transmit_timeout(void *arg) } else { inst->timer_running = 0; } - - /* And we're done */ - return; } @@ -1208,8 +1202,6 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins poll interval for the source and requeueing the polling timeout. Left until the source statistics management has been written */ - - return; } /* ================================================== */ @@ -1511,7 +1503,6 @@ NCR_ProcessUnknown UTI_IPToString(&remote_addr->ip_addr), remote_addr->port); } - return; } /* ================================================== */ @@ -1725,8 +1716,6 @@ NCR_ReportSource(NCR_Instance inst, RPT_SourceReport *report, struct timeval *no default: assert(0); } - - return; } /* ================================================== */ diff --git a/ntp_io.c b/ntp_io.c index a983d86..8f6631e 100644 --- a/ntp_io.c +++ b/ntp_io.c @@ -259,8 +259,6 @@ NIO_Initialise(int family) ) { LOG_FATAL(LOGF_NtpIO, "Could not open any NTP socket"); } - - return; } /* ================================================== */ @@ -281,7 +279,6 @@ NIO_Finalise(void) sock_fd6 = -1; #endif initialised = 0; - return; } /* ================================================== */ @@ -394,8 +391,6 @@ read_from_socket(void *anything) } } - - return; } /* ================================================== */ @@ -510,8 +505,6 @@ send_packet(void *packet, int packetlen, NTP_Remote_Address *remote_addr) LOG(LOGS_WARN, LOGF_NtpIO, "Could not send to %s:%d : %s", UTI_IPToString(&remote_addr->ip_addr), remote_addr->port, strerror(errno)); } - - return; } /* ================================================== */ diff --git a/ntp_sources.c b/ntp_sources.c index 8a1cfea..0ebd287 100644 --- a/ntp_sources.c +++ b/ntp_sources.c @@ -103,8 +103,6 @@ NSR_Initialise(void) initialised = 1; LCL_AddParameterChangeHandler(slew_sources, NULL); - - return; } /* ================================================== */ @@ -113,7 +111,6 @@ void NSR_Finalise(void) { initialised = 0; - return; /* Nothing to do yet */ } /* ================================================== */ @@ -179,8 +176,6 @@ find_slot(NTP_Remote_Address *remote_addr, int *slot, int *found) *found = 0; *slot = hash; } - - return; } /* ================================================== */ @@ -670,8 +665,6 @@ NSR_GetActivityReport(RPT_ActivityReport *report) for (us = unresolved_sources; us; us = us->next) { report->unresolved++; } - - return; } diff --git a/reference.c b/reference.c index c5bc1e3..615a707 100644 --- a/reference.c +++ b/reference.c @@ -244,8 +244,6 @@ REF_Initialise(void) /* Make first entry in tracking log */ REF_SetUnsynchronised(); - - return; } /* ================================================== */ @@ -264,7 +262,6 @@ REF_Finalise(void) Free(fb_drifts); initialised = 0; - return; } /* ================================================== */ @@ -849,8 +846,6 @@ REF_SetReference(int stratum, /* And now set the freq and offset to zero */ our_frequency = 0.0; our_offset = 0.0; - - return; } /* ================================================== */ diff --git a/regress.c b/regress.c index 3670afb..a0196c1 100644 --- a/regress.c +++ b/regress.c @@ -103,8 +103,6 @@ RGR_WeightedRegression *sb0 = sqrt(*s2 / W + aa * aa); *s2 *= (n / W); /* Giving weighted average of variances */ - - return; } /* ================================================== */ diff --git a/rtc.c b/rtc.c index 4010900..9384afb 100644 --- a/rtc.c +++ b/rtc.c @@ -108,9 +108,6 @@ RTC_Initialise(void) } else { driver_initialised = 0; } - - return; - } /* ================================================== */ diff --git a/rtc_linux.c b/rtc_linux.c index c1dc601..2ef4c2d 100644 --- a/rtc_linux.c +++ b/rtc_linux.c @@ -189,7 +189,6 @@ discard_samples(int new_first) memmove(system_times, system_times + new_first, n_to_save * sizeof(struct timeval)); n_samples = n_to_save; - return; } /* ================================================== */ @@ -217,8 +216,6 @@ accumulate_sample(time_t rtc, struct timeval *sys) ++n_samples_since_regression; } ++n_samples; - return; - } /* ================================================== */ @@ -678,8 +675,6 @@ handle_initial_trim(void) (after_init_hook)(after_init_hook_arg); operating_mode = OM_NORMAL; - - return; } /* ================================================== */ diff --git a/sched.c b/sched.c index 4dea13d..d8e4b6f 100644 --- a/sched.c +++ b/sched.c @@ -150,8 +150,6 @@ SCH_Initialise(void) srandom(tv.tv_sec << 16 ^ tv.tv_usec); initialised = 1; - - return; } @@ -160,7 +158,6 @@ SCH_Initialise(void) void SCH_Finalise(void) { initialised = 0; - return; /* Nothing to do for now */ } /* ================================================== */ @@ -187,8 +184,6 @@ SCH_AddInputFileHandler if ((fd + 1) > one_highest_fd) { one_highest_fd = fd + 1; } - - return; } @@ -219,9 +214,6 @@ SCH_RemoveInputFileHandler(int fd) } one_highest_fd = fd_to_check; - - return; - } /* ================================================== */ @@ -265,7 +257,6 @@ release_tqe(TimerQueueEntry *node) { node->next = tqe_free_list; tqe_free_list = node; - return; } /* ================================================== */ @@ -633,9 +624,6 @@ SCH_MainLoop(void) } } - - return; - } /* ================================================== */ diff --git a/sources.c b/sources.c index e758b87..55d0708 100644 --- a/sources.c +++ b/sources.c @@ -165,8 +165,6 @@ void SRC_Initialise(void) { LCL_AddParameterChangeHandler(slew_sources, NULL); LCL_AddDispersionNotifyHandler(add_dispersion, NULL); - - return; } /* ================================================== */ @@ -176,7 +174,6 @@ void SRC_Finalise(void) LCL_RemoveParameterChangeHandler(slew_sources, NULL); LCL_RemoveDispersionNotifyHandler(add_dispersion, NULL); initialised = 0; - return; } /* ================================================== */ @@ -268,7 +265,6 @@ void SRC_GetFrequencyRange(SRC_Instance instance, double *lo, double *hi) assert(initialised); SST_GetFrequencyRange(instance->stats, lo, hi); - return; } /* ================================================== */ @@ -311,8 +307,6 @@ void SRC_AccumulateSample SST_DoNewRegression(inst->stats); /* And redo clock selection */ SRC_SelectSource(inst->ref_id); - - return; } /* ================================================== */ diff --git a/sourcestats.c b/sourcestats.c index 2034c65..c775ac2 100644 --- a/sourcestats.c +++ b/sourcestats.c @@ -204,7 +204,6 @@ void SST_DeleteInstance(SST_Stats inst) { Free(inst); - return; } /* ================================================== */ @@ -348,8 +347,6 @@ find_best_sample_index(SST_Stats inst, double *times_back) #if 0 LOG(LOGS_INFO, LOGF_SourceStats, "n=%d best_index=%d", n, best_index); #endif - - return; } /* ================================================== */ @@ -519,8 +516,6 @@ SST_GetReferenceData(SST_Stats inst, struct timeval *now, LOG(LOGS_INFO, LOGF_SourceStats, "n=%d freq=%f skew=%f del=%f disp=%f ofs=%f str=%d", inst->n_samples, *frequency, *skew, *root_delay, *root_dispersion, *offset, *stratum); #endif - - return; } /* ================================================== */ @@ -596,8 +591,6 @@ SST_GetSelectionData(SST_Stats inst, struct timeval *now, #else (void)average_ok; #endif - - return; } /* ================================================== */ @@ -677,8 +670,6 @@ SST_SlewSamples(SST_Stats inst, struct timeval *when, double dfreq, double doffs #else (void)prev; (void)prev_freq; #endif - - return; } /* ================================================== */ diff --git a/sys.c b/sys.c index 6c752fa..765af09 100644 --- a/sys.c +++ b/sys.c @@ -91,8 +91,6 @@ SYS_Finalise(void) #if defined(__NetBSD__) SYS_NetBSD_Finalise(); #endif - - return; } /* ================================================== */ @@ -104,8 +102,6 @@ void SYS_DropRoot(char *user) #else LOG_FATAL(LOGF_Sys, "dropping root privileges not supported"); #endif - - return; } /* ================================================== */ @@ -117,8 +113,6 @@ void SYS_SetScheduler(int SchedPriority) #else LOG_FATAL(LOGF_Sys, "scheduler priority setting not supported"); #endif - - return; } /* ================================================== */ @@ -130,8 +124,6 @@ void SYS_LockMemory(void) #else LOG_FATAL(LOGF_Sys, "memory locking not supported"); #endif - - return; } /* ================================================== */ diff --git a/sys_linux.c b/sys_linux.c index e3fb1d4..f6c2d8d 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -598,8 +598,6 @@ initiate_slew(void) offset_register = 0.0; } - - return; } /* ================================================== */ @@ -856,8 +854,6 @@ get_offset_correction(struct timeval *raw, update_nano_slew_error(noffset, 0); *err = get_slow_slew_error(raw) + get_fast_slew_error(raw) + get_nano_slew_error();; } - - return; } /* ================================================== */ @@ -871,8 +867,6 @@ set_leap(int leap) LOG(LOGS_INFO, LOGF_SysLinux, "System clock status set to %s leap second", leap ? (leap > 0 ? "insert" : "delete") : "not insert/delete"); - - return; } /* ================================================== */ @@ -910,7 +904,6 @@ guess_hz_and_shift_hz(int tick, int *hz, int *shift_hz) /* oh dear. doomed. */ *hz = 0; *shift_hz = 0; - return; } /* ================================================== */ diff --git a/sys_solaris.c b/sys_solaris.c index 54d2bde..065bacd 100644 --- a/sys_solaris.c +++ b/sys_solaris.c @@ -110,8 +110,6 @@ clock_initialise(void) if (adjtime(&newadj, &oldadj) < 0) { LOG_FATAL(LOGF_SysSolaris, "adjtime() failed"); } - - return; } /* ================================================== */ @@ -120,9 +118,6 @@ static void clock_finalise(void) { /* Nothing to do yet */ - - return; - } /* ================================================== */ @@ -217,7 +212,6 @@ accrue_offset(double offset, double corr_rate) stop_adjust(); offset_register += offset; start_adjust(); - return; } /* ================================================== */ @@ -296,7 +290,6 @@ get_offset_correction(struct timeval *raw, start_adjust(); if (err) *err = 0.0; - return; } /* ================================================== */ @@ -304,7 +297,6 @@ get_offset_correction(struct timeval *raw, static void immediate_step(void) { - return; } /* ================================================== */ @@ -468,8 +460,6 @@ SYS_Solaris_Finalise(void) if (need_dosynctodr) { set_dosynctodr(1); } - - return; } /* ================================================== */ diff --git a/sys_sunos.c b/sys_sunos.c index 3ac67a0..7c323b3 100644 --- a/sys_sunos.c +++ b/sys_sunos.c @@ -101,8 +101,6 @@ clock_initialise(void) if (adjtime(&newadj, &oldadj) < 0) { LOG_FATAL(LOGF_SysSunOS, "adjtime() failed"); } - - return; } /* ================================================== */ @@ -111,9 +109,6 @@ static void clock_finalise(void) { /* Nothing to do yet */ - - return; - } /* ================================================== */ @@ -221,7 +216,6 @@ accrue_offset(double offset, double corr_rate) stop_adjust(); offset_register += offset; start_adjust(); - return; } /* ================================================== */ @@ -283,7 +277,6 @@ get_offset_correction(struct timeval *raw, start_adjust(); if (err) *err = 0.0; - return; } /* ================================================== */ @@ -291,7 +284,6 @@ get_offset_correction(struct timeval *raw, static void immediate_step(void) { - return; } /* ================================================== */ @@ -420,8 +412,6 @@ SYS_SunOS_Finalise(void) /* When exiting, we want to return the machine to its 'autonomous' tracking mode */ setup_kernel(1); - - return; } /* ================================================== */ diff --git a/util.c b/util.c index 2c4a98d..0fee32b 100644 --- a/util.c +++ b/util.c @@ -107,8 +107,6 @@ UTI_DiffTimevals(struct timeval *result, (0,1000000) */ UTI_NormaliseTimeval(result); /* JGH */ - - return; } /* ================================================== */