fix MIN/MAX confusion.

This commit is contained in:
christos 2017-03-10 02:21:37 +00:00
parent 47dd052817
commit 027a0f2366

View File

@ -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 @@ npf_table_create(const char *name, u_int tid, int type,
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;