Remove unncessary return statements

This commit is contained in:
Miroslav Lichvar 2013-05-21 14:29:22 +02:00
parent d510154ba2
commit 359d444343
26 changed files with 0 additions and 176 deletions

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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 */
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -174,7 +174,6 @@ CLG_Initialise(void)
void
CLG_Finalise(void)
{
return;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

8
conf.c
View file

@ -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;
}
/* ================================================== */

4
keys.c
View file

@ -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;
}
/* ================================================== */

16
local.c
View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}

View file

@ -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;
}
/* ================================================== */

View file

@ -103,8 +103,6 @@ RGR_WeightedRegression
*sb0 = sqrt(*s2 / W + aa * aa);
*s2 *= (n / W); /* Giving weighted average of variances */
return;
}
/* ================================================== */

3
rtc.c
View file

@ -108,9 +108,6 @@ RTC_Initialise(void)
} else {
driver_initialised = 0;
}
return;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

12
sched.c
View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

8
sys.c
View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

View file

@ -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;
}
/* ================================================== */

2
util.c
View file

@ -107,8 +107,6 @@ UTI_DiffTimevals(struct timeval *result,
(0,1000000) */
UTI_NormaliseTimeval(result); /* JGH */
return;
}
/* ================================================== */