Add missing const keywords.

This commit is contained in:
ed 2012-10-19 14:29:03 +00:00
parent 5d9ce2d3e8
commit b146225385
3 changed files with 8 additions and 8 deletions

View File

@ -1330,7 +1330,7 @@ static void ParseOption (const char* option, const char* parms)
struct in_addr addrValue;
int max;
char* end;
CODE* fac_record = NULL;
const CODE* fac_record = NULL;
/*
* Find option from table.
*/

View File

@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
#define SYSLOG_NAMES
#include <syslog.h>
static int decode(char *, CODE *);
static int decode(char *, const CODE *);
static int pencode(char *);
static void logmessage(int, const char *, const char *, const char *,
const char *);
@ -271,9 +271,9 @@ pencode(char *s)
}
static int
decode(char *name, CODE *codetab)
decode(char *name, const CODE *codetab)
{
CODE *c;
const CODE *c;
if (isdigit(*name))
return (atoi(name));

View File

@ -312,7 +312,7 @@ static void cfline(const char *, struct filed *,
static const char *cvthname(struct sockaddr *);
static void deadq_enter(pid_t, const char *);
static int deadq_remove(pid_t);
static int decode(const char *, CODE *);
static int decode(const char *, const CODE *);
static void die(int);
static void dodie(int);
static void dofsync(void);
@ -1123,7 +1123,7 @@ fprintlog(struct filed *f, int flags, const char *msg)
char p_n[5]; /* Hollow laugh */
if (LogFacPri > 1) {
CODE *c;
const CODE *c;
for (c = facilitynames; c->c_name; c++) {
if (c->c_val == fac) {
@ -2029,9 +2029,9 @@ cfline(const char *line, struct filed *f, const char *prog, const char *host)
* Decode a symbolic name to a numeric value
*/
static int
decode(const char *name, CODE *codetab)
decode(const char *name, const CODE *codetab)
{
CODE *c;
const CODE *c;
char *p, buf[40];
if (isdigit(*name))