diff options
author | 2015-11-13 21:34:06 +0000 | |
---|---|---|
committer | 2015-11-13 21:34:06 +0000 | |
commit | 30a3ee2a95a34f412953a5afd0db03ccf7a2a1d9 (patch) | |
tree | eaa83cd283fb019ba005a76cf641219c0afae05c | |
parent | Ev SHELL no longer relevant; (diff) | |
download | wireguard-openbsd-30a3ee2a95a34f412953a5afd0db03ccf7a2a1d9.tar.xz wireguard-openbsd-30a3ee2a95a34f412953a5afd0db03ccf7a2a1d9.zip |
There's no need for at.c globals to be extern.
-rw-r--r-- | usr.bin/at/at.c | 22 | ||||
-rw-r--r-- | usr.bin/at/at.h | 11 |
2 files changed, 12 insertions, 21 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c index 9b519111bbe..5c5a452bb0b 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -1,4 +1,4 @@ -/* $OpenBSD: at.c,v 1.74 2015/11/12 21:12:05 millert Exp $ */ +/* $OpenBSD: at.c,v 1.75 2015/11/13 21:34:06 millert Exp $ */ /* * at.c : Put file into atrun queue @@ -69,17 +69,17 @@ char *no_export[] = "EUID", "GROUPS", "PPID", "UID", "SSH_AUTH_SOCK", "SSH_AGENT_PID", }; -int program = AT; /* default program mode */ -char atfile[PATH_MAX]; /* path to the at spool file */ -int fcreated; /* whether or not we created the file yet */ -char atqueue = 0; /* which queue to examine for jobs (atq) */ -char vflag = 0; /* show completed but unremoved jobs (atq) */ -char force = 0; /* suppress errors (atrm) */ -char interactive = 0; /* interactive mode (atrm) */ +static int program = AT; /* default program mode */ +static char atfile[PATH_MAX]; /* path to the at spool file */ +static int fcreated; /* whether or not we created the file yet */ +static char atqueue = 0; /* which queue to examine for jobs (atq) */ +static char vflag = 0; /* show completed but unremoved jobs (atq) */ +static char force = 0; /* suppress errors (atrm) */ +static char interactive = 0; /* interactive mode (atrm) */ static int send_mail = 0; /* whether we are sending mail */ -uid_t user_uid; /* user's real uid */ -gid_t user_gid; /* user's real gid */ -gid_t spool_gid; /* gid for writing to at spool */ +static uid_t user_uid; /* user's real uid */ +static gid_t user_gid; /* user's real gid */ +static gid_t spool_gid; /* gid for writing to at spool */ static void sigc(int); static void writefile(const char *, time_t, char); diff --git a/usr.bin/at/at.h b/usr.bin/at/at.h index 6218baf28f4..8a7816fd1fc 100644 --- a/usr.bin/at/at.h +++ b/usr.bin/at/at.h @@ -1,4 +1,4 @@ -/* $OpenBSD: at.h,v 1.11 2010/07/02 23:40:09 krw Exp $ */ +/* $OpenBSD: at.h,v 1.12 2015/11/13 21:34:06 millert Exp $ */ /* * at.h - header for at(1) @@ -25,13 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -extern int fcreated; -extern int program; -extern char atfile[]; -extern char vflag; -extern char force; -extern char interactive; - enum { ATQ, ATRM, AT, BATCH, CAT }; /* what are we running as? */ struct atjob { @@ -45,6 +38,4 @@ struct atjob { #define DEFAULT_BATCH_QUEUE 'E' #define DEFAULT_AT_QUEUE 'c' - time_t parsetime(int, char **); - |