diff options
author | brian <brian@FreeBSD.org> | 1999-08-06 16:46:29 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-08-06 16:46:29 +0000 |
commit | 292c37a981ed6ba79c90ba184aeeb491ae0e0d7d (patch) | |
tree | 3c8462075601f38289ae0c8b18323ee87bd6c05e /sys/net | |
parent | 5b101ade5218f2e4decb192fd0999c707483e88a (diff) | |
download | FreeBSD-src-292c37a981ed6ba79c90ba184aeeb491ae0e0d7d.zip FreeBSD-src-292c37a981ed6ba79c90ba184aeeb491ae0e0d7d.tar.gz |
Back out redundant checks
Pointed out by: bde
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_loop.c | 7 | ||||
-rw-r--r-- | sys/net/if_ppp.c | 10 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index bc4b544..47663e8 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_loop.c 8.1 (Berkeley) 6/10/93 - * $Id: if_loop.c,v 1.39 1999/07/06 19:23:13 des Exp $ + * $Id: if_loop.c,v 1.40 1999/08/06 13:53:02 brian Exp $ */ /* @@ -346,10 +346,7 @@ loioctl(ifp, cmd, data) break; case SIOCSIFMTU: - if (ifr->ifr_mtu < IF_MINMTU || ifr->ifr_mtu > IF_MAXMTU) - error = EINVAL; - else - ifp->if_mtu = ifr->ifr_mtu; + ifp->if_mtu = ifr->ifr_mtu; break; case SIOCSIFFLAGS: diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 9598d21..4e666b3 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -69,7 +69,7 @@ * Paul Mackerras (paulus@cs.anu.edu.au). */ -/* $Id: if_ppp.c,v 1.61 1999/07/06 19:23:13 des Exp $ */ +/* $Id: if_ppp.c,v 1.62 1999/08/06 13:53:02 brian Exp $ */ /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */ /* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */ @@ -618,13 +618,9 @@ pppsioctl(ifp, cmd, data) if (ifr->ifr_mtu > PPP_MAXMTU) error = EINVAL; else { - if (ifr->ifr_mtu < IF_MINMTU || ifr->ifr_mtu > IF_MAXMTU) - error = EINVAL; - else { - sc->sc_if.if_mtu = ifr->ifr_mtu; - if (sc->sc_setmtu) + sc->sc_if.if_mtu = ifr->ifr_mtu; + if (sc->sc_setmtu) (*sc->sc_setmtu)(sc); - } } break; |