diff options
author | 2002-02-08 19:02:41 +0000 | |
---|---|---|
committer | 2002-02-08 19:02:41 +0000 | |
commit | 386e935c7fa3f2ea8a111a18b25d65ffd70b2fa5 (patch) | |
tree | e781bcf5248921347c15bb7c77ef8b4c8f19bc43 | |
parent | simplify sys_pread a bit. (diff) | |
download | wireguard-openbsd-386e935c7fa3f2ea8a111a18b25d65ffd70b2fa5.tar.xz wireguard-openbsd-386e935c7fa3f2ea8a111a18b25d65ffd70b2fa5.zip |
since we're checking, avoid an unnecessary write
-rw-r--r-- | sys/arch/sparc/dev/qe.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/qe.c b/sys/arch/sparc/dev/qe.c index c0e2088f4a5..aee12234387 100644 --- a/sys/arch/sparc/dev/qe.c +++ b/sys/arch/sparc/dev/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.19 2002/02/08 18:53:38 jason Exp $ */ +/* $OpenBSD: qe.c,v 1.20 2002/02/08 19:02:41 jason Exp $ */ /* * Copyright (c) 1998, 2000 Jason L. Wright. @@ -366,13 +366,14 @@ qe_tint(sc) * If we freed up at least one descriptor and tx is blocked, * unblock it and start it up again. */ - if ((sc->sc_first_td != bix) && (ifp->if_flags & IFF_OACTIVE)) { - ifp->if_flags &= ~IFF_OACTIVE; - qestart(ifp); + if (sc->sc_first_td != bix) { + sc->sc_first_td = bix; + if (ifp->if_flags & IFF_OACTIVE) { + ifp->if_flags &= ~IFF_OACTIVE; + qestart(ifp); + } } - sc->sc_first_td = bix; - return (1); } |