summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2011-07-12 15:23:50 +0000
committerjsg <jsg@openbsd.org>2011-07-12 15:23:50 +0000
commitf5c78379de1505d6cf45a52416cf30091448cf8d (patch)
tree38ff11b7098df3aa8015d5de6a5fd8a14713a94f
parentprint out the amount of memory used for cache. ok otto (diff)
downloadwireguard-openbsd-f5c78379de1505d6cf45a52416cf30091448cf8d.tar.xz
wireguard-openbsd-f5c78379de1505d6cf45a52416cf30091448cf8d.zip
break up a line of code that involved a decrement operator and macros
so it evaluates in the order we want. ok claudio@
-rw-r--r--sys/net/if_gre.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 998248e4611..ce5956f180a 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.56 2011/07/09 00:47:18 henning Exp $ */
+/* $OpenBSD: if_gre.c,v 1.57 2011/07/12 15:23:50 jsg Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -764,7 +764,8 @@ gre_recv_keepalive(struct gre_softc *sc)
}
break;
case GRE_STATE_UP:
- sc->sc_ka_holdmax = MAX(sc->sc_ka_holdmax--, sc->sc_ka_cnt);
+ sc->sc_ka_holdmax--;
+ sc->sc_ka_holdmax = MAX(sc->sc_ka_holdmax, sc->sc_ka_cnt);
break;
}