summaryrefslogtreecommitdiffstats
path: root/usr.bin/at/at.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-11-06 17:32:29 +0000
committered <ed@FreeBSD.org>2011-11-06 17:32:29 +0000
commita2c6b647f175a4883ba5ab0f8ad139455fda88a0 (patch)
tree58a59ad89bbdc9e16f323354e08a4db07e98c2e1 /usr.bin/at/at.c
parent8fdc44b4598afdb5f444d4e5da3dedc3c347a37f (diff)
downloadFreeBSD-src-a2c6b647f175a4883ba5ab0f8ad139455fda88a0.zip
FreeBSD-src-a2c6b647f175a4883ba5ab0f8ad139455fda88a0.tar.gz
Add missing static keywords to at(1).
While there, tidy up the privs.h part, where at.c has to #define to declare some globals. Also group static and non-static global variables in at.c.
Diffstat (limited to 'usr.bin/at/at.c')
-rw-r--r--usr.bin/at/at.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index c036013..283965e 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -63,8 +63,6 @@ __FBSDID("$FreeBSD$");
#include "panic.h"
#include "parsetime.h"
#include "perm.h"
-
-#define MAIN
#include "privs.h"
/* Macros */
@@ -90,22 +88,22 @@ enum { ATQ, ATRM, AT, BATCH, CAT }; /* what program we want to run */
/* File scope variables */
-const char *no_export[] =
-{
+static const char *no_export[] = {
"TERM", "TERMCAP", "DISPLAY", "_"
-} ;
+};
static int send_mail = 0;
+static char *atinput = NULL; /* where to get input from */
+static char atqueue = 0; /* which queue to examine for jobs (atq) */
/* External variables */
extern char **environ;
int fcreated;
char atfile[] = ATJOB_DIR "12345678901234";
-
-char *atinput = (char*)0; /* where to get input from */
-char atqueue = 0; /* which queue to examine for jobs (atq) */
char atverify = 0; /* verify time instead of queuing job */
char *namep;
+uid_t real_uid, effective_uid;
+gid_t real_gid, effective_gid;
/* Function declarations */
OpenPOWER on IntegriCloud