Add some const.

This commit is contained in:
dholland 2013-01-13 22:53:01 +00:00
parent 284486f905
commit 9c53e91b7d
6 changed files with 25 additions and 25 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dump.h,v 1.47 2012/05/05 21:03:02 christos Exp $ */
/* $NetBSD: dump.h,v 1.48 2013/01/13 22:53:01 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@ -182,7 +182,7 @@ void quit(const char *fmt, ...) __attribute__((__format__(__printf__,1,2)));
time_t do_stats(void);
void statussig(int);
void timeest(void);
time_t unctime(char *);
time_t unctime(const char *);
/* mapping routines */
union dinode;
@ -212,7 +212,7 @@ void close_rewind(void);
void dumpblock(daddr_t, int);
void startnewtape(int);
void trewind(int);
void writerec(char *, int);
void writerec(const char *, int);
void Exit(int);
void dumpabort(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dumprmt.c,v 1.34 2011/08/29 14:34:59 joerg Exp $ */
/* $NetBSD: dumprmt.c,v 1.35 2013/01/13 22:53:01 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: dumprmt.c,v 1.34 2011/08/29 14:34:59 joerg Exp $");
__RCSID("$NetBSD: dumprmt.c,v 1.35 2013/01/13 22:53:01 dholland Exp $");
#endif
#endif /* not lint */
@ -73,7 +73,7 @@ static int rmtstate = TS_CLOSED;
static int rmtape;
static char *rmtpeer;
static int okname(char *);
static int okname(const char *);
static int rmtcall(const char *, const char *, int);
__dead static void rmtconnaborted(int);
static int rmtgetb(void);
@ -157,9 +157,9 @@ rmtgetconn(void)
}
static int
okname(char *cp0)
okname(const char *cp0)
{
char *cp;
const char *cp;
int c;
for (cp = cp0; *cp; cp++) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: itime.c,v 1.18 2010/03/11 01:32:59 christos Exp $ */
/* $NetBSD: itime.c,v 1.19 2013/01/13 22:53:01 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93";
#else
__RCSID("$NetBSD: itime.c,v 1.18 2010/03/11 01:32:59 christos Exp $");
__RCSID("$NetBSD: itime.c,v 1.19 2013/01/13 22:53:01 dholland Exp $");
#endif
#endif /* not lint */
@ -65,7 +65,7 @@ int nddates = 0;
static void dumprecout(FILE *, struct dumpdates *);
static int getrecord(FILE *, struct dumpdates *);
static int makedumpdate(struct dumpdates *, char *);
static int makedumpdate(struct dumpdates *, const char *);
static void readdumptimes(FILE *);
void
@ -256,7 +256,7 @@ getrecord(FILE *df, struct dumpdates *ddatep)
}
static int
makedumpdate(struct dumpdates *ddp, char *tbuf)
makedumpdate(struct dumpdates *ddp, const char *tbuf)
{
char un_buf[128];

View File

@ -1,4 +1,4 @@
/* $NetBSD: optr.c,v 1.38 2012/04/07 16:44:10 christos Exp $ */
/* $NetBSD: optr.c,v 1.39 2013/01/13 22:53:01 dholland Exp $ */
/*-
* Copyright (c) 1980, 1988, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94";
#else
__RCSID("$NetBSD: optr.c,v 1.38 2012/04/07 16:44:10 christos Exp $");
__RCSID("$NetBSD: optr.c,v 1.39 2013/01/13 22:53:01 dholland Exp $");
#endif
#endif /* not lint */
@ -64,7 +64,7 @@ __RCSID("$NetBSD: optr.c,v 1.38 2012/04/07 16:44:10 christos Exp $");
#include "pathnames.h"
void alarmcatch(int);
struct fstab *allocfsent(struct fstab *);
struct fstab *allocfsent(const struct fstab *);
int datesort(const void *, const void *);
extern char *time_string;
extern char default_time_string[];
@ -319,7 +319,7 @@ quit(const char *fmt, ...)
*/
struct fstab *
allocfsent(struct fstab *fs)
allocfsent(const struct fstab *fs)
{
struct fstab *new;
char buf[MAXPATHLEN];

View File

@ -1,4 +1,4 @@
/* $NetBSD: tape.c,v 1.50 2011/09/16 16:13:17 plunky Exp $ */
/* $NetBSD: tape.c,v 1.51 2013/01/13 22:53:01 dholland Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: tape.c,v 1.50 2011/09/16 16:13:17 plunky Exp $");
__RCSID("$NetBSD: tape.c,v 1.51 2013/01/13 22:53:01 dholland Exp $");
#endif
#endif /* not lint */
@ -71,7 +71,7 @@ extern const char *host;
char *nexttape;
static ssize_t atomic_read(int, char *, int);
static ssize_t atomic_write(int, char *, int);
static ssize_t atomic_write(int, const char *, int);
static void doslave(int, int);
static void enslave(void);
static void flushtape(void);
@ -157,12 +157,12 @@ alloctape(void)
}
void
writerec(char *dp, int isspcl)
writerec(const char *dp, int isspcl)
{
slp->req[trecno].dblk = (daddr_t)0;
slp->req[trecno].count = 1;
*(union u_spcl *)(*(nextblock)++) = *(union u_spcl *)dp;
*(union u_spcl *)(*(nextblock)++) = *(const union u_spcl *)dp;
if (isspcl)
lastspclrec = iswap64(spcl.c_tapea);
trecno++;
@ -948,7 +948,7 @@ atomic_read(int fd, char *buf, int count)
* loop until the count is satisfied (or error).
*/
static ssize_t
atomic_write(int fd, char *buf, int count)
atomic_write(int fd, const char *buf, int count)
{
ssize_t got, need = count;

View File

@ -1,4 +1,4 @@
/* $NetBSD: unctime.c,v 1.15 2003/08/07 10:04:15 agc Exp $ */
/* $NetBSD: unctime.c,v 1.16 2013/01/13 22:53:01 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94";
#else
__RCSID("$NetBSD: unctime.c,v 1.15 2003/08/07 10:04:15 agc Exp $");
__RCSID("$NetBSD: unctime.c,v 1.16 2013/01/13 22:53:01 dholland Exp $");
#endif
#endif /* not lint */
@ -51,7 +51,7 @@ __RCSID("$NetBSD: unctime.c,v 1.15 2003/08/07 10:04:15 agc Exp $");
*/
time_t
unctime(char *str)
unctime(const char *str)
{
struct tm then;