Browse Source

const'ify conffile

From: Joerg Sonnenberger <joerg@britannica.bec.de>
OPENBSD_3_7
henning 20 years ago
parent
commit
389962a6b2
3 changed files with 7 additions and 7 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/ntpd.c
  2. +2
    -2
      src/usr.sbin/ntpd/ntpd.h
  3. +3
    -3
      src/usr.sbin/ntpd/parse.y

+ 2
- 2
src/usr.sbin/ntpd/ntpd.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.c,v 1.23 2004/11/04 23:04:22 henning Exp $ */
/* $OpenBSD: ntpd.c,v 1.24 2004/11/10 11:27:54 henning Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -81,7 +81,7 @@ main(int argc, char *argv[])
struct ntpd_conf conf; struct ntpd_conf conf;
struct pollfd pfd[POLL_MAX]; struct pollfd pfd[POLL_MAX];
pid_t chld_pid = 0, pid; pid_t chld_pid = 0, pid;
char *conffile;
const char *conffile;
int ch, nfds, timeout = INFTIM; int ch, nfds, timeout = INFTIM;
int pipe_chld[2]; int pipe_chld[2];


+ 2
- 2
src/usr.sbin/ntpd/ntpd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.41 2004/10/22 21:17:37 henning Exp $ */
/* $OpenBSD: ntpd.h,v 1.42 2004/11/10 11:27:54 henning Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -210,7 +210,7 @@ void ntp_settime(double);
void ntp_host_dns(char *, u_int32_t); void ntp_host_dns(char *, u_int32_t);
/* parse.y */ /* parse.y */
int parse_config(char *, struct ntpd_conf *);
int parse_config(const char *, struct ntpd_conf *);
/* config.c */ /* config.c */
int host(const char *, struct ntp_addr **); int host(const char *, struct ntp_addr **);


+ 3
- 3
src/usr.sbin/ntpd/parse.y View File

@ -1,4 +1,4 @@
/* $OpenBSD: parse.y,v 1.22 2004/11/05 14:28:29 henning Exp $ */
/* $OpenBSD: parse.y,v 1.23 2004/11/10 11:27:54 henning Exp $ */
/* /*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -39,7 +39,7 @@ static struct ntpd_conf *conf;
static FILE *fin = NULL; static FILE *fin = NULL;
static int lineno = 1; static int lineno = 1;
static int errors = 0; static int errors = 0;
char *infile;
const char *infile;
int yyerror(const char *, ...); int yyerror(const char *, ...);
int yyparse(void); int yyparse(void);
@ -399,7 +399,7 @@ yylex(void)
} }
int int
parse_config(char *filename, struct ntpd_conf *xconf)
parse_config(const char *filename, struct ntpd_conf *xconf)
{ {
conf = xconf; conf = xconf;
lineno = 1; lineno = 1;


Loading…
Cancel
Save