Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern pcq(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
details: https://anonhg.NetBSD.org/src/rev/4523a1c0b0f6
branches: trunk
changeset: 373661:4523a1c0b0f6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Feb 23 03:03:58 2023 +0000
description:
pcq(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
diffstat:
sys/kern/subr_pcq.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 1facd5c8291d -r 4523a1c0b0f6 sys/kern/subr_pcq.c
--- a/sys/kern/subr_pcq.c Thu Feb 23 03:03:45 2023 +0000
+++ b/sys/kern/subr_pcq.c Thu Feb 23 03:03:58 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pcq.c,v 1.18 2023/02/23 03:03:45 riastradh Exp $ */
+/* $NetBSD: subr_pcq.c,v 1.19 2023/02/23 03:03:58 riastradh Exp $ */
/*-
* Copyright (c) 2009, 2019 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.18 2023/02/23 03:03:45 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.19 2023/02/23 03:03:58 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -290,7 +290,8 @@
{
pcq_t *pcq;
- KASSERT(nitems > 0 && nitems <= PCQ_MAXLEN);
+ KASSERT(nitems > 0);
+ KASSERT(nitems <= PCQ_MAXLEN);
pcq = kmem_zalloc(offsetof(pcq_t, pcq_items[nitems]), kmflags);
if (pcq != NULL) {
Home |
Main Index |
Thread Index |
Old Index