u_char -> char for several things:

- inet_ntop()
- if_indextoname()
- variable assignment matching
char -> u_char in one place for variable assignment matching
This commit is contained in:
mrg 2006-05-11 08:35:47 +00:00
parent 0f3d8a43c2
commit 9aae0c27f9
4 changed files with 20 additions and 20 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.9 2006/05/11 07:20:19 mrg Exp $
# $NetBSD: Makefile,v 1.10 2006/05/11 08:35:47 mrg Exp $
.include <bsd.own.mk>
@ -17,6 +17,6 @@ FILES= rtadvd.conf
.include <bsd.prog.mk>
.if ${HAVE_GCC} == 4
.if (${HAVE_GCC} == 4)
COPTS.dump.c=-fno-strict-aliasing
.endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: config.c,v 1.24 2006/05/10 22:30:33 rpaulo Exp $ */
/* $NetBSD: config.c,v 1.25 2006/05/11 08:35:47 mrg Exp $ */
/* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */
/*
@ -604,7 +604,7 @@ get_prefix(struct rainfo *rai)
struct prefix *pp;
struct in6_addr *a;
u_char *p, *ep, *m, *lim;
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
if (getifaddrs(&ifap) < 0) {
syslog(LOG_ERR,
@ -713,7 +713,7 @@ static void
add_prefix(struct rainfo *rai, struct in6_prefixreq *ipr)
{
struct prefix *prefix;
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
if ((prefix = malloc(sizeof(*prefix))) == NULL) {
syslog(LOG_ERR, "<%s> memory allocation failed",
@ -754,7 +754,7 @@ add_prefix(struct rainfo *rai, struct in6_prefixreq *ipr)
void
delete_prefix(struct prefix *prefix)
{
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
struct rainfo *rai = prefix->rainfo;
remque(prefix);
@ -771,7 +771,7 @@ delete_prefix(struct prefix *prefix)
void
invalidate_prefix(struct prefix *prefix)
{
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
struct timeval timo;
struct rainfo *rai = prefix->rainfo;
@ -812,7 +812,7 @@ prefix_timeout(void *arg)
void
update_prefix(struct prefix * prefix)
{
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
struct rainfo *rai = prefix->rainfo;
if (prefix->timer == NULL) { /* sanity check */
@ -858,7 +858,7 @@ init_prefix(struct in6_prefixreq *ipr)
/* omit other field initialization */
}
else if (ipr->ipr_origin < PR_ORIG_RR) {
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
syslog(LOG_WARNING, "<%s> Added prefix(%s)'s origin %d is"
"lower than PR_ORIG_RR(router renumbering)."
@ -906,7 +906,7 @@ void
make_packet(struct rainfo *rainfo)
{
size_t packlen, lladdroptlen = 0;
char *buf;
u_char *buf;
struct nd_router_advert *ra;
struct nd_opt_prefix_info *ndopt_pi;
struct nd_opt_mtu *ndopt_mtu;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rrenum.c,v 1.12 2006/03/05 23:47:08 rpaulo Exp $ */
/* $NetBSD: rrenum.c,v 1.13 2006/05/11 08:35:47 mrg Exp $ */
/* $KAME: rrenum.c,v 1.14 2004/06/14 05:36:00 itojun Exp $ */
/*
@ -335,7 +335,7 @@ static int
rr_command_check(int len, struct icmp6_router_renum *rr, struct in6_addr *from,
struct in6_addr *dst)
{
u_char ntopbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN];
/* omit rr minimal length check. hope kernel have done it. */
/* rr_command length check */
@ -418,7 +418,7 @@ void
rr_input(int len, struct icmp6_router_renum *rr, struct in6_pktinfo *pi,
struct sockaddr_in6 *from, struct in6_addr *dst)
{
u_char ntopbuf[2][INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
char ntopbuf[2][INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
syslog(LOG_DEBUG,
"<%s> RR received from %s to %s on %s",

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtadvd.c,v 1.30 2006/03/05 23:47:08 rpaulo Exp $ */
/* $NetBSD: rtadvd.c,v 1.31 2006/05/11 08:35:47 mrg Exp $ */
/* $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $ */
/*
@ -86,7 +86,7 @@ int rtsock = -1;
int accept_rr = 0;
int dflag = 0, sflag = 0;
u_char *conffile = NULL;
char *conffile = NULL;
struct rainfo *ralist = NULL;
struct nd_optlist {
@ -331,7 +331,7 @@ rtmsg_input()
int n, type, ifindex = 0, plen;
size_t len;
char msg[2048], *next, *lim;
u_char ifname[IF_NAMESIZE];
char ifname[IF_NAMESIZE];
struct prefix *prefix;
struct rainfo *rai;
struct in6_addr *addr;
@ -552,7 +552,7 @@ rtadvd_input()
int ifindex = 0;
struct cmsghdr *cm;
struct in6_pktinfo *pi = NULL;
u_char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
struct in6_addr dst = in6addr_any;
/*
@ -731,7 +731,7 @@ static void
rs_input(int len, struct nd_router_solicit *rs,
struct in6_pktinfo *pi, struct sockaddr_in6 *from)
{
u_char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
union nd_opts ndopts;
struct rainfo *ra;
struct soliciter *sol;
@ -864,7 +864,7 @@ ra_input(int len, struct nd_router_advert *ra,
struct in6_pktinfo *pi, struct sockaddr_in6 *from)
{
struct rainfo *rai;
u_char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
char ntopbuf[INET6_ADDRSTRLEN], ifnamebuf[IFNAMSIZ];
union nd_opts ndopts;
char *on_off[] = {"OFF", "ON"};
u_int32_t reachabletime, retranstimer, mtu;
@ -1026,7 +1026,7 @@ prefix_check(struct nd_opt_prefix_info *pinfo,
u_int32_t preferred_time, valid_time;
struct prefix *pp;
int inconsistent = 0;
u_char ntopbuf[INET6_ADDRSTRLEN], prefixbuf[INET6_ADDRSTRLEN];
char ntopbuf[INET6_ADDRSTRLEN], prefixbuf[INET6_ADDRSTRLEN];
struct timeval now;
#if 0 /* impossible */