Make usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 clean
Tested with: make universe MFC after: 3 days
This commit is contained in:
parent
8666079cdb
commit
66d48cdafe
@ -221,6 +221,7 @@ int job_runqueue(void),
|
||||
get_char(FILE *),
|
||||
get_string(char *, int, FILE *, char *),
|
||||
swap_uids(void),
|
||||
swap_uids_back(void),
|
||||
load_env(char *, FILE *),
|
||||
cron_pclose(FILE *),
|
||||
strcmp_until(char *, char *, int),
|
||||
@ -238,7 +239,7 @@ char *env_get(char *, char **),
|
||||
user *load_user(int, struct passwd *, char *),
|
||||
*find_user(cron_db *, char *);
|
||||
|
||||
entry *load_entry(FILE *, void (*)(),
|
||||
entry *load_entry(FILE *, void (*)(char *),
|
||||
struct passwd *, char **);
|
||||
|
||||
FILE *cron_popen(char *, char *, entry *);
|
||||
|
@ -8,6 +8,8 @@ BINOWN= root
|
||||
BINMODE=4555
|
||||
PRECIOUSPROG=
|
||||
|
||||
WARNS=3
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../cron
|
||||
|
||||
DPADD= ${LIBCRON} ${LIBMD} ${LIBUTIL}
|
||||
|
@ -73,8 +73,7 @@ static int replace_cmd(void);
|
||||
|
||||
|
||||
static void
|
||||
usage(msg)
|
||||
char *msg;
|
||||
usage(char *msg)
|
||||
{
|
||||
fprintf(stderr, "crontab: usage error: %s\n", msg);
|
||||
fprintf(stderr, "%s\n%s\n",
|
||||
@ -85,9 +84,7 @@ usage(msg)
|
||||
|
||||
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int exitstatus;
|
||||
|
||||
@ -219,7 +216,7 @@ parse_args(argc, argv)
|
||||
err(ERROR_EXIT, "swapping uids");
|
||||
if (!(NewCrontab = fopen(Filename, "r")))
|
||||
err(ERROR_EXIT, "%s", Filename);
|
||||
if (swap_uids() < OK)
|
||||
if (swap_uids_back() < OK)
|
||||
err(ERROR_EXIT, "swapping uids back");
|
||||
}
|
||||
}
|
||||
@ -414,14 +411,14 @@ edit_cmd() {
|
||||
|
||||
/* parent */
|
||||
{
|
||||
void (*f[4])();
|
||||
f[0] = signal(SIGHUP, SIG_IGN);
|
||||
f[1] = signal(SIGINT, SIG_IGN);
|
||||
f[2] = signal(SIGTERM, SIG_IGN);
|
||||
void (*sig[3])(int signal);
|
||||
sig[0] = signal(SIGHUP, SIG_IGN);
|
||||
sig[1] = signal(SIGINT, SIG_IGN);
|
||||
sig[2] = signal(SIGTERM, SIG_IGN);
|
||||
xpid = wait(&waiter);
|
||||
signal(SIGHUP, f[0]);
|
||||
signal(SIGINT, f[1]);
|
||||
signal(SIGTERM, f[2]);
|
||||
signal(SIGHUP, sig[0]);
|
||||
signal(SIGINT, sig[1]);
|
||||
signal(SIGTERM, sig[2]);
|
||||
}
|
||||
if (xpid != pid) {
|
||||
warnx("wrong PID (%d != %d) from \"%s\"", xpid, pid, editor);
|
||||
@ -498,7 +495,6 @@ replace_cmd() {
|
||||
entry *e;
|
||||
time_t now = time(NULL);
|
||||
char **envp = env_init();
|
||||
void (*f[3])();
|
||||
|
||||
if (envp == NULL) {
|
||||
warnx("cannot allocate memory");
|
||||
|
@ -4,6 +4,8 @@ LIB= cron
|
||||
INTERNALLIB=
|
||||
SRCS= entry.c env.c misc.c
|
||||
|
||||
WARNS = 3
|
||||
|
||||
CFLAGS+= -I${.CURDIR}/../cron
|
||||
CFLAGS+= -DLOGIN_CAP -DPAM
|
||||
|
||||
|
@ -87,7 +87,7 @@ free_entry(e)
|
||||
entry *
|
||||
load_entry(file, error_func, pw, envp)
|
||||
FILE *file;
|
||||
void (*error_func)();
|
||||
void (*error_func)(char *);
|
||||
struct passwd *pw;
|
||||
char **envp;
|
||||
{
|
||||
|
@ -48,6 +48,7 @@ static const char rcsid[] =
|
||||
|
||||
|
||||
static int LogFD = ERR;
|
||||
void mkprint(register char*, register unsigned char*, register int);
|
||||
|
||||
|
||||
int
|
||||
@ -324,9 +325,7 @@ skip_comments(file)
|
||||
* FALSE otherwise.
|
||||
*/
|
||||
static int
|
||||
in_file(string, file)
|
||||
char *string;
|
||||
FILE *file;
|
||||
in_file(char *string, FILE *file)
|
||||
{
|
||||
char line[MAX_TEMPSTR];
|
||||
|
||||
@ -521,10 +520,7 @@ first_word(s, t)
|
||||
* heavily ascii-dependent.
|
||||
*/
|
||||
void
|
||||
mkprint(dst, src, len)
|
||||
register char *dst;
|
||||
register unsigned char *src;
|
||||
register int len;
|
||||
mkprint(register char *dst, register unsigned char *src, register int len)
|
||||
{
|
||||
while (len-- > 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user