pkgsrc/net/userppp/patches/patch-an
abs 8a5cc9768e Update userppp to 001107nb1
Fix compilation under gcc3: avoid trigraphs, comparison always
	true/false, and pass -fno-strict-aliasing
2003-06-08 10:36:17 +00:00

25 lines
1,011 B
Text

$NetBSD: patch-an,v 1.1 2003/06/08 10:36:18 abs Exp $
--- ppp/ipcp.c.orig Sun Jun 8 11:29:03 2003
+++ ppp/ipcp.c
@@ -1194,8 +1194,7 @@ IpcpDecodeConfig(struct fsm *fp, u_char
break;
case 6: /* RFC1332 */
if (ntohs(pcomp->proto) == PROTO_VJCOMP) {
- if (pcomp->slots <= MAX_VJ_STATES
- && pcomp->slots >= MIN_VJ_STATES) {
+ if (pcomp->slots >= MIN_VJ_STATES) {
/* Ok, we can do that */
ipcp->peer_compproto = compproto;
ipcp->heis1172 = 0;
@@ -1230,9 +1229,7 @@ IpcpDecodeConfig(struct fsm *fp, u_char
case MODE_NAK:
if (ntohs(pcomp->proto) == PROTO_VJCOMP) {
- if (pcomp->slots > MAX_VJ_STATES)
- pcomp->slots = MAX_VJ_STATES;
- else if (pcomp->slots < MIN_VJ_STATES)
+ if (pcomp->slots < MIN_VJ_STATES)
pcomp->slots = MIN_VJ_STATES;
compproto = (ntohs(pcomp->proto) << 16) + (pcomp->slots << 8) +
pcomp->compcid;