make local constant arrays const
This commit is contained in:
parent
f1e8bc8da8
commit
ca797c3c15
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getaddrinfo.c,v 1.52 2001/01/24 15:05:48 itojun Exp $ */
|
||||
/* $NetBSD: getaddrinfo.c,v 1.53 2001/01/25 22:50:55 jdolecek Exp $ */
|
||||
/* $KAME: getaddrinfo.c,v 1.29 2000/08/31 17:26:57 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -79,7 +79,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: getaddrinfo.c,v 1.52 2001/01/24 15:05:48 itojun Exp $");
|
||||
__RCSID("$NetBSD: getaddrinfo.c,v 1.53 2001/01/25 22:50:55 jdolecek Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -256,7 +256,7 @@ static int res_searchN __P((const char *, struct res_target *));
|
||||
static int res_querydomainN __P((const char *, const char *,
|
||||
struct res_target *));
|
||||
|
||||
static char *ai_errlist[] = {
|
||||
static const char * const ai_errlist[] = {
|
||||
"Success",
|
||||
"Address family for hostname not supported", /* EAI_ADDRFAMILY */
|
||||
"Temporary failure in name resolution", /* EAI_AGAIN */
|
||||
@ -321,7 +321,8 @@ gai_strerror(ecode)
|
||||
{
|
||||
if (ecode < 0 || ecode > EAI_MAX)
|
||||
ecode = EAI_MAX;
|
||||
return ai_errlist[ecode];
|
||||
/* LINTED const castaway */
|
||||
return (char *) ai_errlist[ecode];
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getnameinfo.c,v 1.24 2001/01/04 03:57:58 lukem Exp $ */
|
||||
/* $NetBSD: getnameinfo.c,v 1.25 2001/01/25 22:50:56 jdolecek Exp $ */
|
||||
/* $KAME: getnameinfo.c,v 1.45 2000/09/25 22:43:56 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -44,7 +44,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
__RCSID("$NetBSD: getnameinfo.c,v 1.24 2001/01/04 03:57:58 lukem Exp $");
|
||||
__RCSID("$NetBSD: getnameinfo.c,v 1.25 2001/01/25 22:50:56 jdolecek Exp $");
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include "namespace.h"
|
||||
@ -69,7 +69,7 @@ __weak_alias(getnameinfo,_getnameinfo)
|
||||
#define YES 1
|
||||
#define NO 0
|
||||
|
||||
static struct afd {
|
||||
static const struct afd {
|
||||
int a_af;
|
||||
int a_addrlen;
|
||||
int a_socklen;
|
||||
@ -115,7 +115,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
||||
size_t servlen;
|
||||
int flags;
|
||||
{
|
||||
struct afd *afd;
|
||||
const struct afd *afd;
|
||||
struct servent *sp;
|
||||
struct hostent *hp;
|
||||
u_short port;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: getnetconfig.c,v 1.5 2001/01/04 14:57:17 lukem Exp $ */
|
||||
/* $NetBSD: getnetconfig.c,v 1.6 2001/01/25 22:50:56 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -98,7 +98,7 @@ __weak_alias(nc_sperror,_nc_sperror)
|
||||
*/
|
||||
#define NC_NOLOOKUP "-"
|
||||
|
||||
static char *_nc_errors[] = {
|
||||
static const char * const _nc_errors[] = {
|
||||
"Netconfig database not found",
|
||||
"Not enough memory",
|
||||
"Not initialized",
|
||||
@ -601,7 +601,7 @@ parse_ncp(stringp, ncp)
|
||||
char *
|
||||
nc_sperror()
|
||||
{
|
||||
char *message;
|
||||
const char *message;
|
||||
|
||||
switch(nc_error) {
|
||||
case NC_NONETCONFIG:
|
||||
@ -619,7 +619,8 @@ nc_sperror()
|
||||
default:
|
||||
message = "Unknown network selection error";
|
||||
}
|
||||
return (message);
|
||||
/* LINTED const castaway */
|
||||
return ((char *)message);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rpc_generic.c,v 1.5 2001/01/04 14:42:20 lukem Exp $ */
|
||||
/* $NetBSD: rpc_generic.c,v 1.6 2001/01/25 22:50:57 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
||||
@ -65,7 +65,7 @@ struct handle {
|
||||
int nettype;
|
||||
};
|
||||
|
||||
struct _rpcnettype {
|
||||
static const struct _rpcnettype {
|
||||
const char *name;
|
||||
const int type;
|
||||
} _rpctypelist[] = {
|
||||
@ -86,7 +86,7 @@ struct netid_af {
|
||||
int protocol;
|
||||
};
|
||||
|
||||
static struct netid_af na_cvt[] = {
|
||||
static const struct netid_af na_cvt[] = {
|
||||
{ "udp", AF_INET, IPPROTO_UDP },
|
||||
{ "tcp", AF_INET, IPPROTO_TCP },
|
||||
#ifdef INET6
|
||||
|
Loading…
Reference in New Issue
Block a user