change some char to u_char to match other variables and functions.

This commit is contained in:
mrg 2006-05-20 20:37:15 +00:00
parent e9d0e73f70
commit 2d245c626f
2 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: etherfun.c,v 1.7 2005/12/11 12:18:19 christos Exp $ */
/* $NetBSD: etherfun.c,v 1.8 2006/05/20 20:37:15 mrg Exp $ */
/*
*
@ -100,7 +100,7 @@ void
do_send_tftp ( int mesgtype )
{
u_long res, iptmp, lcv;
char *tot;
u_char *tot;
if ( mesgtype == 0 ) {
tot = tftp_r + (sizeof(MSG)-1);
@ -108,7 +108,7 @@ do_send_tftp ( int mesgtype )
if (myport < 1000) myport += 1000;
servport = FTP_PORT; /* to start */
} else {
tot = (char *)tftp_a + 4;
tot = (u_char *)tftp_a + 4;
}
memcpy (eh->ether_dhost, servea, sizeof(servea));
@ -125,7 +125,7 @@ do_send_tftp ( int mesgtype )
memcpy(iph->ip_src, myip, sizeof(myip));
memcpy(iph->ip_dst, servip, sizeof(servip));
iph->ip_sum = 0;
iph->ip_len = tot - (char *)iph;
iph->ip_len = tot - (u_char *)iph;
res = oc_cksum(iph, sizeof(struct ip), 0);
iph->ip_sum = 0xffff & ~res;
udph->uh_sport = myport;
@ -145,7 +145,7 @@ do_send_tftp ( int mesgtype )
}
}
udph->uh_ulen = tot - (char *)udph;
udph->uh_ulen = tot - (u_char *)udph;
le_put( buf, tot - buf);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: etherfun.h,v 1.2 1998/01/05 07:03:06 perry Exp $ */
/* $NetBSD: etherfun.h,v 1.3 2006/05/20 20:37:15 mrg Exp $ */
/*
*
@ -111,14 +111,14 @@ struct tftphr {
/* globals */
int last_ack;
char buf[N];
u_char buf[N];
struct ether_header *eh = (struct ether_header *)buf;
struct ether_arp *rarp =
(struct ether_arp *)(buf + sizeof(struct ether_header));
struct ip *iph = (struct ip *)(buf + sizeof(struct ether_header));
struct udp *udph = (struct udp *)(buf + sizeof(struct ether_header) +
sizeof(struct ip));
char *tftp_r = buf + sizeof(struct ether_header) + sizeof(struct ip) +
u_char *tftp_r = buf + sizeof(struct ether_header) + sizeof(struct ip) +
sizeof(struct udp);
struct tftph *tftp_a = (struct tftph *)(buf + sizeof(struct ether_header) +
sizeof(struct ip) + sizeof(struct udp));