cmdtab is supposed to be const.
This commit is contained in:
parent
80d082b8df
commit
de8753b3b0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: timedc.c,v 1.19 2007/01/28 13:51:29 cbiere Exp $ */
|
||||
/* $NetBSD: timedc.c,v 1.20 2008/02/16 07:31:13 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1985, 1993 The Regents of the University of California.
|
||||
@ -40,7 +40,7 @@ __COPYRIGHT(
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)timedc.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: timedc.c,v 1.19 2007/01/28 13:51:29 cbiere Exp $");
|
||||
__RCSID("$NetBSD: timedc.c,v 1.20 2008/02/16 07:31:13 matt Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -64,13 +64,13 @@ int fromatty;
|
||||
char *margv[MAX_MARGV];
|
||||
char cmdline[200];
|
||||
jmp_buf toplevel;
|
||||
static struct cmd *getcmd(char *);
|
||||
static const struct cmd *getcmd(char *);
|
||||
static int drop_privileges(void);
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
struct cmd *c;
|
||||
const struct cmd *c;
|
||||
|
||||
fcntl(3, F_CLOSEM);
|
||||
openlog("timedc", 0, LOG_AUTH);
|
||||
@ -140,14 +140,14 @@ intr(int signo)
|
||||
}
|
||||
|
||||
|
||||
static struct cmd *
|
||||
static const struct cmd *
|
||||
getcmd(char *name)
|
||||
{
|
||||
const char *p;
|
||||
char *q;
|
||||
struct cmd *c, *found;
|
||||
const struct cmd *c, *found;
|
||||
int nmatches, longest;
|
||||
extern struct cmd cmdtab[];
|
||||
extern const struct cmd cmdtab[];
|
||||
extern int NCMDS;
|
||||
|
||||
longest = 0;
|
||||
@ -209,8 +209,8 @@ makeargv(void)
|
||||
void
|
||||
help(int argc, char *argv[])
|
||||
{
|
||||
struct cmd *c;
|
||||
extern struct cmd cmdtab[];
|
||||
const struct cmd *c;
|
||||
extern const struct cmd cmdtab[];
|
||||
|
||||
if (argc == 1) {
|
||||
int i, j, w;
|
||||
|
Loading…
Reference in New Issue
Block a user