From bc37e5945658912ebe4aad06ce5e9db9348b3b40 Mon Sep 17 00:00:00 2001 From: ozaki-r Date: Thu, 20 Apr 2017 06:27:08 +0000 Subject: [PATCH] Use IPSEC_DIR_IS_INOROUT (NFC) --- sys/netipsec/key.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 9139b018f2a9..bf3717c91e99 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -1,4 +1,4 @@ -/* $NetBSD: key.c,v 1.115 2017/04/20 03:41:47 ozaki-r Exp $ */ +/* $NetBSD: key.c,v 1.116 2017/04/20 06:27:08 ozaki-r Exp $ */ /* $FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $ */ /* $KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $ */ @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.115 2017/04/20 03:41:47 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.116 2017/04/20 06:27:08 ozaki-r Exp $"); /* * This code is referd to RFC 2367 @@ -594,8 +594,7 @@ key_allocsp(const struct secpolicyindex *spidx, u_int dir, const char* where, in int s; KASSERT(spidx != NULL); - KASSERTMSG(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, - "invalid direction %u", dir); + KASSERTMSG(IPSEC_DIR_IS_INOROUT(dir), "invalid direction %u", dir); KEYDEBUG_PRINTF(KEYDEBUG_IPSEC_STAMP, "DP from %s:%u\n", where, tag);