Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci fix bad conditional in iavf_parse_modprop()
details: https://anonhg.NetBSD.org/src/rev/a0b4c8e5de18
branches: trunk
changeset: 943731:a0b4c8e5de18
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Sep 09 00:35:36 2020 +0000
description:
fix bad conditional in iavf_parse_modprop()
found by clang
diffstat:
sys/dev/pci/if_iavf.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 805901a9dbe5 -r a0b4c8e5de18 sys/dev/pci/if_iavf.c
--- a/sys/dev/pci/if_iavf.c Tue Sep 08 23:58:09 2020 +0000
+++ b/sys/dev/pci/if_iavf.c Wed Sep 09 00:35:36 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iavf.c,v 1.2 2020/09/08 13:28:51 jakllsch Exp $ */
+/* $NetBSD: if_iavf.c,v 1.3 2020/09/09 00:35:36 jakllsch Exp $ */
/*
* Copyright (c) 2013-2015, Intel Corporation
@@ -75,7 +75,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.2 2020/09/08 13:28:51 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iavf.c,v 1.3 2020/09/09 00:35:36 jakllsch Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -5235,7 +5235,7 @@
if (obj != NULL && prop_object_type(obj) == PROP_TYPE_NUMBER) {
val = prop_number_signed_value((prop_number_t)obj);
- if (val < 1 || I40E_MAX_VF_QUEUES) {
+ if (val < 1 || val > I40E_MAX_VF_QUEUES) {
printf("iavf: invalid queue size(1 <= n <= %d)",
I40E_MAX_VF_QUEUES);
} else {
Home |
Main Index |
Thread Index |
Old Index