summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/job.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2002-07-08 18:11:02 +0000
committermillert <millert@openbsd.org>2002-07-08 18:11:02 +0000
commitc95ed47381d34b7e84872222ea23180d76bd77fb (patch)
tree33a254b436d31034b8aea06a054a6c2f0695dea7 /usr.sbin/cron/job.c
parentoffload the arguments from the stack before performing (diff)
downloadwireguard-openbsd-c95ed47381d34b7e84872222ea23180d76bd77fb.tar.xz
wireguard-openbsd-c95ed47381d34b7e84872222ea23180d76bd77fb.zip
Merge in some changes from Paul Vixie's tree; most are cosmetic
o ANSI function headers o return (foo) not return foo o add -oi to sendmail flags o update email address in man pages o make some strings const o completely remove globbing cruft from popen.c o whitespace changes o add DOW_STAR to flags for "monthly", "weekly", and "daily" cron entries
Diffstat (limited to 'usr.sbin/cron/job.c')
-rw-r--r--usr.sbin/cron/job.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/usr.sbin/cron/job.c b/usr.sbin/cron/job.c
index c85c7270d53..876fa2c0c83 100644
--- a/usr.sbin/cron/job.c
+++ b/usr.sbin/cron/job.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: job.c,v 1.3 2001/02/18 19:48:35 millert Exp $ */
+/* $OpenBSD: job.c,v 1.4 2002/07/08 18:11:02 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
*/
@@ -21,28 +21,21 @@
*/
#if !defined(lint) && !defined(LINT)
-static char rcsid[] = "$OpenBSD: job.c,v 1.3 2001/02/18 19:48:35 millert Exp $";
+static char const rcsid[] = "$OpenBSD: job.c,v 1.4 2002/07/08 18:11:02 millert Exp $";
#endif
-
#include "cron.h"
-
typedef struct _job {
struct _job *next;
entry *e;
user *u;
} job;
-
static job *jhead = NULL, *jtail = NULL;
-
void
-job_add(e, u)
- entry *e;
- user *u;
-{
+job_add(entry *e, user *u) {
job *j;
/* if already on queue, keep going */
@@ -65,12 +58,10 @@ job_add(e, u)
jtail = j;
}
-
int
-job_runqueue()
-{
- job *j, *jn;
- int run = 0;
+job_runqueue(void) {
+ job *j, *jn;
+ int run = 0;
for (j = jhead; j; j = jn) {
do_command(j->e, j->u);