Module Name:    src
Committed By:   kre
Date:           Sat Mar 29 17:29:20 UTC 2025

Modified Files:
        src/sys/sys: cpu_data.h

Log Message:
CPU_COUNT() macro args are properly parenthesised when used.

This will hopefully fix builds after recent changes to how KASSERT()
uses its args.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/sys/cpu_data.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/cpu_data.h
diff -u src/sys/sys/cpu_data.h:1.56 src/sys/sys/cpu_data.h:1.57
--- src/sys/sys/cpu_data.h:1.56	Sun May 12 10:34:56 2024
+++ src/sys/sys/cpu_data.h	Sat Mar 29 17:29:20 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_data.h,v 1.56 2024/05/12 10:34:56 rillig Exp $	*/
+/*	$NetBSD: cpu_data.h,v 1.57 2025/03/29 17:29:20 kre Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2006, 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -246,7 +246,7 @@ int	mi_cpu_attach(struct cpu_info *);
 do {								\
 	extern bool kpreempt_disabled(void);			\
 	KASSERT(kpreempt_disabled());				\
-	KASSERT((unsigned)idx < CPU_COUNT_MAX);			\
+	KASSERT((unsigned)(idx) < CPU_COUNT_MAX);		\
 	curcpu()->ci_counts[(idx)] += (d);			\
 } while (0)
 

Reply via email to