Sprinkle const.
This commit is contained in:
parent
5385dfa817
commit
9864c6e2cf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hd_subr.c,v 1.17 2004/04/18 19:11:39 matt Exp $ */
|
||||
/* $NetBSD: hd_subr.c,v 1.18 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hd_subr.c,v 1.17 2004/04/18 19:11:39 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hd_subr.c,v 1.18 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -412,7 +412,7 @@ hd_flush(ifp)
|
||||
void
|
||||
hd_message(hdp, msg)
|
||||
struct hdcb *hdp;
|
||||
char *msg;
|
||||
const char *msg;
|
||||
{
|
||||
if (hdcbhead->hd_next)
|
||||
printf("HDLC(%s): %s\n", format_ntn(hdp->hd_xcp), msg);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hd_var.h,v 1.11 2003/08/07 16:33:01 agc Exp $ */
|
||||
/* $NetBSD: hd_var.h,v 1.12 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -172,7 +172,7 @@ int hd_decode __P((struct hdcb *, struct Hdlc_frame *));
|
||||
void hd_writeinternal __P((struct hdcb *, int, int ));
|
||||
void hd_append __P((struct hdtxq *, struct mbuf *));
|
||||
void hd_flush __P((struct ifnet *));
|
||||
void hd_message __P((struct hdcb *, char *));
|
||||
void hd_message __P((struct hdcb *, const char *));
|
||||
int hd_status __P((struct hdcb *));
|
||||
struct mbuf *hd_remove __P((struct hdtxq *));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_x25subr.c,v 1.34 2004/04/18 19:11:39 matt Exp $ */
|
||||
/* $NetBSD: if_x25subr.c,v 1.35 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_x25subr.c,v 1.34 2004/04/18 19:11:39 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_x25subr.c,v 1.35 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_iso.h"
|
||||
@ -451,7 +451,8 @@ x25_rtrequest(cmd, rt, info)
|
||||
*/
|
||||
if (x25_dgram_sockmask == 0) {
|
||||
x25_dgram_sockmask =
|
||||
SA(rn_addmask((caddr_t) & x25_dgmask, 0, 4)->rn_key);
|
||||
/*XXXUNCONST*/
|
||||
SA(__UNCONST(rn_addmask(&x25_dgmask, 0, 4)->rn_key));
|
||||
}
|
||||
if (rt->rt_flags & RTF_GATEWAY) {
|
||||
if (rt->rt_llinfo)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: llc_input.c,v 1.14 2005/02/26 22:45:10 perry Exp $ */
|
||||
/* $NetBSD: llc_input.c,v 1.15 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -76,7 +76,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: llc_input.c,v 1.14 2005/02/26 22:45:10 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: llc_input.c,v 1.15 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -452,9 +452,9 @@ llc_ctlinput(prc, addr, info)
|
||||
return 0;
|
||||
|
||||
case PRC_IFDOWN: {
|
||||
struct llc_linkcb *linkp;
|
||||
struct llc_linkcb *xlinkp;
|
||||
struct llc_linkcb *nlinkp;
|
||||
int i;
|
||||
int xi;
|
||||
|
||||
/*
|
||||
* All links are accessible over the doubly linked list llccb_q
|
||||
@ -464,17 +464,17 @@ llc_ctlinput(prc, addr, info)
|
||||
* A for-loop is not that great an idea as the linkp
|
||||
* will get deleted by llc_timer()
|
||||
*/
|
||||
linkp = LQFIRST;
|
||||
while (LQVALID(linkp)) {
|
||||
nlinkp = LQNEXT(linkp);
|
||||
if ((linkp->llcl_if = ifp) != NULL) {
|
||||
i = splnet();
|
||||
(void)llc_statehandler(linkp, (struct llc *)0,
|
||||
xlinkp = LQFIRST;
|
||||
while (LQVALID(xlinkp)) {
|
||||
nlinkp = LQNEXT(xlinkp);
|
||||
if ((xlinkp->llcl_if = ifp) != NULL) {
|
||||
xi = splnet();
|
||||
(void)llc_statehandler(xlinkp, NULL,
|
||||
NL_DISCONNECT_REQUEST,
|
||||
0, 1);
|
||||
splx(i);
|
||||
splx(xi);
|
||||
}
|
||||
linkp = nlinkp;
|
||||
xlinkp = nlinkp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: llc_subr.c,v 1.20 2005/02/26 22:45:10 perry Exp $ */
|
||||
/* $NetBSD: llc_subr.c,v 1.21 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -76,7 +76,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: llc_subr.c,v 1.20 2005/02/26 22:45:10 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: llc_subr.c,v 1.21 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -100,7 +100,7 @@ __KERNEL_RCSID(0, "$NetBSD: llc_subr.c,v 1.20 2005/02/26 22:45:10 perry Exp $");
|
||||
/*
|
||||
* Frame names for diagnostic messages
|
||||
*/
|
||||
char *frame_names[] = {
|
||||
const char *frame_names[] = {
|
||||
"INFO", "RR", "RNR", "REJ", "DM", "SABME", "DISC",
|
||||
"UA", "FRMR", "UI", "XID", "TEST", "ILLEGAL", "TIMER", "N2xT1"
|
||||
};
|
||||
@ -2499,9 +2499,9 @@ llc_anytimersup(linkp)
|
||||
#define SAL(s) ((struct sockaddr_dl *)&(s)->llcl_addr)
|
||||
#define CHECK(l,s) if (LLC_STATEEQ(l,s)) return __STRING(s)
|
||||
|
||||
char *timer_names[] = {"ACK", "P", "BUSY", "REJ", "AGE"};
|
||||
const char *timer_names[] = {"ACK", "P", "BUSY", "REJ", "AGE"};
|
||||
|
||||
char *
|
||||
const char *
|
||||
llc_getstatename(linkp)
|
||||
struct llc_linkcb *linkp;
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: llc_var.h,v 1.14 2005/02/26 22:45:10 perry Exp $ */
|
||||
/* $NetBSD: llc_var.h,v 1.15 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -651,7 +651,7 @@ extern int af_link_rts_init_done;
|
||||
extern struct ifqueue llcintrq;
|
||||
|
||||
extern struct llccb_q llccb_q;
|
||||
extern char *frame_names[];
|
||||
extern const char *frame_names[];
|
||||
|
||||
/*
|
||||
* Function prototypes
|
||||
@ -711,7 +711,7 @@ struct llc_linkcb *llc_newlink __P((struct sockaddr_dl *, struct ifnet *,
|
||||
void llc_dellink __P((struct llc_linkcb *));
|
||||
int llc_decode __P((struct llc *, struct llc_linkcb *));
|
||||
int llc_anytimersup __P((struct llc_linkcb *));
|
||||
char *llc_getstatename __P((struct llc_linkcb *));
|
||||
const char *llc_getstatename __P((struct llc_linkcb *));
|
||||
void llc_link_dump __P((struct llc_linkcb *, const char *));
|
||||
void llc_trace __P((struct llc_linkcb *, int, const char *));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pk_debug.c,v 1.12 2003/08/07 16:33:03 agc Exp $ */
|
||||
/* $NetBSD: pk_debug.c,v 1.13 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -74,7 +74,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_debug.c,v 1.12 2003/08/07 16:33:03 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_debug.c,v 1.13 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -91,13 +91,13 @@ __KERNEL_RCSID(0, "$NetBSD: pk_debug.c,v 1.12 2003/08/07 16:33:03 agc Exp $");
|
||||
#include <netccitt/pk_var.h>
|
||||
#include <netccitt/pk_extern.h>
|
||||
|
||||
char *pk_state[] = {
|
||||
const char *pk_state[] = {
|
||||
"Listen", "Ready", "Received-Call",
|
||||
"Sent-Call", "Data-Transfer","Received-Clear",
|
||||
"Sent-Clear",
|
||||
};
|
||||
|
||||
char *pk_name[] = {
|
||||
const char *pk_name[] = {
|
||||
"Call", "Call-Conf", "Clear",
|
||||
"Clear-Conf", "Data", "Intr", "Intr-Conf",
|
||||
"Rr", "Rnr", "Reset", "Reset-Conf",
|
||||
@ -109,7 +109,7 @@ void
|
||||
pk_trace (xcp, m, dir)
|
||||
struct x25config *xcp;
|
||||
struct mbuf *m;
|
||||
char *dir;
|
||||
const char *dir;
|
||||
{
|
||||
char *s;
|
||||
struct x25_packet *xp = mtod(m, struct x25_packet *);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pk_extern.h,v 1.12 2003/06/29 22:31:55 fvdl Exp $ */
|
||||
/* $NetBSD: pk_extern.h,v 1.13 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995 The NetBSD Foundation, Inc.
|
||||
@ -57,7 +57,7 @@ int pk_accton __P((char *));
|
||||
void pk_acct __P((struct pklcd *));
|
||||
|
||||
/* pk_debug.c */
|
||||
void pk_trace __P((struct x25config *, struct mbuf *, char *));
|
||||
void pk_trace __P((struct x25config *, struct mbuf *, const char *));
|
||||
void mbuf_cache __P((struct mbuf_cache *, struct mbuf *));
|
||||
|
||||
/* pk_input.c */
|
||||
@ -107,14 +107,14 @@ int pk_getlcn __P((struct pkcb *));
|
||||
void pk_clear __P((struct pklcd *, int, int));
|
||||
void pk_flowcontrol __P((struct pklcd *, int, int));
|
||||
void pk_flush __P((struct pklcd *));
|
||||
void pk_procerror __P((int, struct pklcd *, char *, int));
|
||||
void pk_procerror __P((int, struct pklcd *, const char *, int));
|
||||
int pk_ack __P((struct pklcd *, unsigned));
|
||||
int pk_decode __P((struct x25_packet *));
|
||||
void pk_restartcause __P((struct pkcb *, struct x25_packet *));
|
||||
void pk_resetcause __P((struct pkcb *, struct x25_packet *));
|
||||
void pk_clearcause __P((struct pkcb *, struct x25_packet *));
|
||||
char *format_ntn __P((struct x25config *));
|
||||
void pk_message __P((int, struct x25config *, char *, ...))
|
||||
void pk_message __P((int, struct x25config *, const char *, ...))
|
||||
__attribute__((__format__(__printf__, 3, 4)));
|
||||
|
||||
int pk_fragment __P((struct pklcd *, struct mbuf *, int, int, int));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pk_input.c,v 1.25 2005/02/26 22:45:10 perry Exp $ */
|
||||
/* $NetBSD: pk_input.c,v 1.26 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1992, 1993
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_input.c,v 1.25 2005/02/26 22:45:10 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_input.c,v 1.26 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include "opt_hdlc.h"
|
||||
#include "opt_llc.h"
|
||||
@ -973,7 +973,7 @@ pk_incoming_call(pkp, m0)
|
||||
struct x25config *xcp = pkp->pk_xcp;
|
||||
int len = m0->m_pkthdr.len;
|
||||
unsigned udlen;
|
||||
char *errstr = "server unavailable";
|
||||
const char *errstr = "server unavailable";
|
||||
octet *u, *facp;
|
||||
int lcn = LCN(xp);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pk_subr.c,v 1.29 2005/02/26 22:45:10 perry Exp $ */
|
||||
/* $NetBSD: pk_subr.c,v 1.30 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1992, 1993
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_subr.c,v 1.29 2005/02/26 22:45:10 perry Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_subr.c,v 1.30 2005/05/29 21:53:52 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -919,7 +919,7 @@ void
|
||||
pk_procerror(error, lcp, errstr, diagnostic)
|
||||
int error;
|
||||
struct pklcd *lcp;
|
||||
char *errstr;
|
||||
const char *errstr;
|
||||
int diagnostic;
|
||||
{
|
||||
|
||||
@ -1167,7 +1167,7 @@ format_ntn(xcp)
|
||||
|
||||
/* VARARGS1 */
|
||||
void
|
||||
pk_message(int lcn, struct x25config * xcp, char * fmt,...)
|
||||
pk_message(int lcn, struct x25config *xcp, const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pk_var.h,v 1.18 2005/02/26 22:45:10 perry Exp $ */
|
||||
/* $NetBSD: pk_var.h,v 1.19 2005/05/29 21:53:52 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -274,6 +274,6 @@ extern struct pklcdhead pk_listenhead;
|
||||
extern struct mbuf_cache pk_input_cache;
|
||||
extern struct mbuf_cache pk_output_cache;
|
||||
|
||||
extern char *pk_name[], *pk_state[];
|
||||
extern const char *pk_name[], *pk_state[];
|
||||
extern int pk_t20, pk_t21, pk_t22, pk_t23;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user