Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net/npf fix MIN/MAX confusion.



details:   https://anonhg.NetBSD.org/src/rev/cd95b78dbdc3
branches:  trunk
changeset: 352004:cd95b78dbdc3
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Mar 10 02:21:37 2017 +0000

description:
fix MIN/MAX confusion.

diffstat:

 sys/net/npf/npf_tableset.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 92c4b055cf70 -r cd95b78dbdc3 sys/net/npf/npf_tableset.c
--- a/sys/net/npf/npf_tableset.c        Fri Mar 10 00:26:43 2017 +0000
+++ b/sys/net/npf/npf_tableset.c        Fri Mar 10 02:21:37 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: npf_tableset.c,v 1.26 2017/01/02 21:49:51 rmind Exp $  */
+/*     $NetBSD: npf_tableset.c,v 1.27 2017/03/10 02:21:37 christos Exp $       */
 
 /*-
  * Copyright (c) 2009-2016 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
 
 #ifdef _KERNEL
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_tableset.c,v 1.26 2017/01/02 21:49:51 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_tableset.c,v 1.27 2017/03/10 02:21:37 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -369,7 +369,7 @@
                LIST_INIT(&t->t_list);
                break;
        case NPF_TABLE_HASH:
-               size = MIN(size, 128);
+               size = MAX(size, 128);
                t->t_hashl = hashinit(size, HASH_LIST, true, &t->t_hashmask);
                if (t->t_hashl == NULL) {
                        goto out;



Home | Main Index | Thread Index | Old Index