- typo. found by markus@openbsd

- correct signedness mixup in pointer passing.
- drop meaningless variable.

Obtained from:	KAME
This commit is contained in:
Hajimu UMEMOTO
2003-10-09 18:44:54 +00:00
parent 45f392d82c
commit 0606da6241
+2 -4
View File
@@ -100,7 +100,6 @@ ipcomp4_input(m, off)
int error; int error;
size_t newlen, olen; size_t newlen, olen;
struct secasvar *sav = NULL; struct secasvar *sav = NULL;
int proto;
if (m->m_pkthdr.len < off + sizeof(struct ipcomp)) { if (m->m_pkthdr.len < off + sizeof(struct ipcomp)) {
ipseclog((LOG_DEBUG, "IPv4 IPComp input: assumption failed " ipseclog((LOG_DEBUG, "IPv4 IPComp input: assumption failed "
@@ -110,7 +109,7 @@ ipcomp4_input(m, off)
} }
md = m_pulldown(m, off, sizeof(*ipcomp), NULL); md = m_pulldown(m, off, sizeof(*ipcomp), NULL);
if (!m) { if (!md) {
m = NULL; /* already freed */ m = NULL; /* already freed */
ipseclog((LOG_DEBUG, "IPv4 IPComp input: assumption failed " ipseclog((LOG_DEBUG, "IPv4 IPComp input: assumption failed "
"(pulldown failure)\n")); "(pulldown failure)\n"));
@@ -119,7 +118,6 @@ ipcomp4_input(m, off)
} }
ipcomp = mtod(md, struct ipcomp *); ipcomp = mtod(md, struct ipcomp *);
ip = mtod(m, struct ip *); ip = mtod(m, struct ip *);
proto = ip->ip_p;
nxt = ipcomp->comp_nxt; nxt = ipcomp->comp_nxt;
#ifdef _IP_VHL #ifdef _IP_VHL
hlen = IP_VHL_HL(ip->ip_vhl) << 2; hlen = IP_VHL_HL(ip->ip_vhl) << 2;
@@ -254,7 +252,7 @@ ipcomp6_input(mp, offp, proto)
int error; int error;
size_t newlen; size_t newlen;
struct secasvar *sav = NULL; struct secasvar *sav = NULL;
char *prvnxtp; u_int8_t *prvnxtp;
m = *mp; m = *mp;
off = *offp; off = *offp;