From: Sami Kerola Date: Sat, 1 Dec 2012 23:44:29 +0000 (+0000) Subject: anacron: make function declarations to be ansi compliant X-Git-Tag: cronie1.4.11~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91e3ed8fad3806fa19ee4484fec38539dc64f4dd;p=cronie anacron: make function declarations to be ansi compliant Signed-off-by: Sami Kerola --- diff --git a/anacron/log.c b/anacron/log.c index 6f4be63..dbfe354 100644 --- a/anacron/log.c +++ b/anacron/log.c @@ -54,7 +54,7 @@ static int log_open = 0; int complaints = 0; static void -xopenlog() +xopenlog(void) { if (!log_open) { @@ -64,7 +64,7 @@ xopenlog() } void -xcloselog() +xcloselog(void) { if (log_open) closelog(); log_open = 0; diff --git a/anacron/main.c b/anacron/main.c index 66928cc..7583bd0 100644 --- a/anacron/main.c +++ b/anacron/main.c @@ -65,7 +65,7 @@ int range_stop = -1; int preferred_hour = -1; static void -print_version() +print_version(void) { printf("Anacron \n" "Copyright (C) 1998 Itai Tzur \n" @@ -77,7 +77,7 @@ print_version() } static void -print_usage() +print_usage(void) { printf("Usage:\n"); printf(" %s [options] [job] ...\n", program_name); @@ -164,7 +164,7 @@ parse_opts(int argc, char *argv[]) } pid_t -xfork() +xfork(void) /* Like fork(), only never returns on failure */ { pid_t pid; @@ -200,7 +200,7 @@ xclose(int fd) } static void -go_background() +go_background(void) /* Become a daemon. The foreground process exits successfully. */ { pid_t pid; @@ -247,7 +247,7 @@ handle_sigusr1(int unused ATTRIBUTE_UNUSED) } static void -set_signal_handling() +set_signal_handling(void) /* We only use SIGALRM, SIGCHLD and SIGUSR1, and we unblock them only * in wait_signal(). */ @@ -284,7 +284,7 @@ set_signal_handling() } static void -wait_signal() +wait_signal(void) /* Return after a signal is caught */ { sigset_t ss; @@ -297,7 +297,7 @@ wait_signal() } static void -wait_children() +wait_children(void) /* Wait until we have no more children (of any kind) */ { while (running_jobs > 0 || running_mailers > 0) @@ -311,7 +311,7 @@ wait_children() } static void -orderly_termination() +orderly_termination(void) /* Execution is diverted here, when we get SIGUSR1 */ { explain("Received SIGUSR1"); @@ -341,7 +341,7 @@ xsleep(unsigned int n) } static void -wait_jobs() +wait_jobs(void) /* Wait until there are no running jobs, * servicing SIGCHLDs and SIGUSR1s in the meantime. */ @@ -356,7 +356,7 @@ wait_jobs() } static void -record_start_time() +record_start_time(void) { struct tm *tm_now; @@ -394,7 +394,7 @@ time_till(job_rec *jr) } static void -fake_jobs() +fake_jobs(void) { int j; @@ -409,7 +409,7 @@ fake_jobs() } static void -explain_intentions() +explain_intentions(void) { int j; diff --git a/anacron/readtab.c b/anacron/readtab.c index 96a8f99..34bd5c0 100644 --- a/anacron/readtab.c +++ b/anacron/readtab.c @@ -81,7 +81,7 @@ conv2int(const char *s) } static char * -read_tab_line () +read_tab_line (void) /* Read one line and return a pointer to it. Return NULL if no more lines. */ @@ -380,7 +380,7 @@ execution_order(const job_rec **job1, const job_rec **job2) } void -arrange_jobs() +arrange_jobs(void) /* Make an array of pointers to jobs that are going to be executed, * and arrange them in the order of execution. * Also lock these jobs. diff --git a/anacron/runjob.c b/anacron/runjob.c index 9656254..ab499b8 100644 --- a/anacron/runjob.c +++ b/anacron/runjob.c @@ -85,7 +85,7 @@ file_size(int fd) } static char * -username() +username(void) { struct passwd *ps; @@ -325,7 +325,7 @@ tend_job(job_rec *jr, int status) } void -tend_children() +tend_children(void) /* This is called whenever we get a SIGCHLD. * Takes care of zombie children. */