summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-06-17 22:09:12 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-06-17 22:09:12 +0000
commit693b1cf701f384e2122f73bb66fb977442bdb4ca (patch)
tree9b73dd0d309a8ef21f4a169e7bee2f835803735f /usr.bin
parentb03a1882c9c85c1f12ab0ad954d699503898ca18 (diff)
Remove trailing whitespace and, for printf, uid/gid are unsigned
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/at/at.c25
-rw-r--r--usr.bin/at/parsetime.c10
-rw-r--r--usr.bin/at/privs.h8
3 files changed, 22 insertions, 21 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index 689d1c8cc80..837c3cf355f 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: at.c,v 1.41 2004/06/03 19:19:07 millert Exp $ */
+/* $OpenBSD: at.c,v 1.42 2004/06/17 22:09:11 millert Exp $ */
/*
* at.c : Put file into atrun queue
@@ -42,7 +42,7 @@
#define TIMESIZE 50 /* Size of buffer passed to strftime() */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: at.c,v 1.41 2004/06/03 19:19:07 millert Exp $";
+static const char rcsid[] = "$OpenBSD: at.c,v 1.42 2004/06/17 22:09:11 millert Exp $";
#endif
/* Variables to remove from the job's environment. */
@@ -93,7 +93,7 @@ panic(const char *a)
/*
* Two-parameter version of panic().
*/
-static __dead void
+static __dead void
panic2(const char *a, const char *b)
{
(void)fprintf(stderr, "%s: %s%s\n", ProgramName, a, b);
@@ -126,7 +126,7 @@ perr(const char *a)
/*
* Two-parameter version of perr().
*/
-static __dead void
+static __dead void
perr2(const char *a, const char *b)
{
if (!force)
@@ -134,7 +134,7 @@ perr2(const char *a, const char *b)
perr(b);
}
-static void
+static void
sigc(int signo)
{
/* If the user presses ^C, remove the spool file and exit. */
@@ -147,7 +147,7 @@ sigc(int signo)
_exit(ERROR_EXIT);
}
-static void
+static void
alarmc(int signo)
{
/* just return */
@@ -293,8 +293,9 @@ writefile(const char *cwd, time_t runtimer, char queue)
if (fpin == NULL)
perr("Cannot open input file");
}
- (void)fprintf(fp, "#!/bin/sh\n# atrun uid=%ld gid=%ld\n# mail %*s %d\n",
- (long)real_uid, (long)real_gid, MAX_UNAME, mailname, send_mail);
+ (void)fprintf(fp, "#!/bin/sh\n# atrun uid=%lu gid=%lu\n# mail %*s %d\n",
+ (unsigned long)real_uid, (unsigned long)real_gid,
+ MAX_UNAME, mailname, send_mail);
/* Write out the umask at the time of invocation */
(void)fprintf(fp, "umask %o\n", cmask);
@@ -801,10 +802,10 @@ ttime(const char *arg)
struct tm *t;
int yearset;
char *p;
-
+
if (gettimeofday(&tv[0], NULL))
panic("Cannot get current time");
-
+
/* Start with the current time. */
now = tv[0].tv_sec;
if ((t = localtime(&now)) == NULL)
@@ -818,7 +819,7 @@ ttime(const char *arg)
*p++ = '\0';
t->tm_sec = ATOI2(p);
}
-
+
yearset = 0;
switch(strlen(arg)) {
case 12: /* CCYYMMDDhhmm */
@@ -846,7 +847,7 @@ ttime(const char *arg)
default:
goto terr;
}
-
+
t->tm_isdst = -1; /* Figure out DST. */
tv[0].tv_sec = tv[1].tv_sec = mktime(t);
if (tv[0].tv_sec != -1)
diff --git a/usr.bin/at/parsetime.c b/usr.bin/at/parsetime.c
index 0ef2db668fa..c3d8e36b8b3 100644
--- a/usr.bin/at/parsetime.c
+++ b/usr.bin/at/parsetime.c
@@ -1,6 +1,6 @@
-/* $OpenBSD: parsetime.c,v 1.13 2003/02/20 20:38:08 millert Exp $ */
+/* $OpenBSD: parsetime.c,v 1.14 2004/06/17 22:09:11 millert Exp $ */
-/*
+/*
* parsetime.c - parse time for at(1)
* Copyright (C) 1993, 1994 Thomas Koenig
*
@@ -141,7 +141,7 @@ static int sc_tokid; /* scanner - token id */
static int sc_tokplur; /* scanner - is token plural? */
#ifndef lint
-static const char rcsid[] = "$OpenBSD: parsetime.c,v 1.13 2003/02/20 20:38:08 millert Exp $";
+static const char rcsid[] = "$OpenBSD: parsetime.c,v 1.14 2004/06/17 22:09:11 millert Exp $";
#endif
/*
@@ -266,7 +266,7 @@ plonk(int tok)
}
-/*
+/*
* expect() gets a token and returns -1 if it's not the token we want
*/
static int
@@ -467,7 +467,7 @@ assign_date(struct tm *tm, int mday, int mon, int year)
}
-/*
+/*
* month() picks apart a month specification
*
* /[<month> NUMBER [NUMBER]] \
diff --git a/usr.bin/at/privs.h b/usr.bin/at/privs.h
index a8bdb17cb85..fed1df876d0 100644
--- a/usr.bin/at/privs.h
+++ b/usr.bin/at/privs.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: privs.h,v 1.8 2003/10/20 21:10:19 jmc Exp $ */
+/* $OpenBSD: privs.h,v 1.9 2004/06/17 22:09:11 millert Exp $ */
-/*
- * privs.h - header for privileged operations
+/*
+ * privs.h - header for privileged operations
* Copyright (C) 1993 Thomas Koenig
*
* Redistribution and use in source and binary forms, with or without
@@ -61,7 +61,7 @@ extern
#endif
uid_t real_uid, effective_uid;
-#ifndef MAIN_PROGRAM
+#ifndef MAIN_PROGRAM
extern
#endif
gid_t real_gid, effective_gid;