summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/include/cpu.h6
-rw-r--r--sys/arch/hppa64/include/cpu.h4
-rw-r--r--sys/arch/i386/include/cpu.h6
-rw-r--r--sys/kern/kern_sysctl.c6
4 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h
index 49bccdf4d9b..2a40ff5ff3c 100644
--- a/sys/arch/amd64/include/cpu.h
+++ b/sys/arch/amd64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.13 2005/08/20 00:33:59 jsg Exp $ */
+/* $OpenBSD: cpu.h,v 1.14 2005/09/20 21:04:13 miod Exp $ */
/* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */
/*-
@@ -141,8 +141,8 @@ extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \
- ci != NULL; ci = ci->ci_next
+#define CPU_INFO_FOREACH(cii, ci) for (cii = 0, ci = cpu_info_list; \
+ ci != NULL; ci = ci->ci_next)
#define CPU_INFO_UNIT(ci) ((ci)->ci_dev->dv_unit)
diff --git a/sys/arch/hppa64/include/cpu.h b/sys/arch/hppa64/include/cpu.h
index 22631489c55..51478cfa4aa 100644
--- a/sys/arch/hppa64/include/cpu.h
+++ b/sys/arch/hppa64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.5 2005/05/31 09:31:16 art Exp $ */
+/* $OpenBSD: cpu.h,v 1.6 2005/09/20 21:04:14 miod Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -142,7 +142,7 @@ struct cpu_info *curcpu(void);
#define CPU_IS_PRIMARY(ci) ((ci)->ci_number == 0)
#define CPU_INFO_ITERATOR int
#define CPU_INFO_FOREACH(cii,ci) \
- cii = 0, ci = curcpu(); ci != NULL; ci = ci->ci_next
+ for (cii = 0, ci = curcpu(); ci != NULL; ci = ci->ci_next)
#define CPU_INFO_UNIT(ci) ((ci)->ci_number)
#ifdef DIAGNOSTIC
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h
index d773fca799b..89d555048de 100644
--- a/sys/arch/i386/include/cpu.h
+++ b/sys/arch/i386/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.68 2005/05/27 10:41:11 kjell Exp $ */
+/* $OpenBSD: cpu.h,v 1.69 2005/09/20 21:04:15 miod Exp $ */
/* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */
/*-
@@ -167,8 +167,8 @@ extern struct cpu_info cpu_info_primary;
extern struct cpu_info *cpu_info_list;
#define CPU_INFO_ITERATOR int
-#define CPU_INFO_FOREACH(cii, ci) cii = 0, ci = cpu_info_list; \
- ci != NULL; ci = ci->ci_next
+#define CPU_INFO_FOREACH(cii, ci) for (cii = 0, ci = cpu_info_list; \
+ ci != NULL; ci = ci->ci_next)
#define CPU_INFO_UNIT(ci) ((ci)->ci_dev.dv_unit)
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index f60cc100d65..71671ff75b5 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.128 2005/07/31 04:36:51 deraadt Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.129 2005/09/20 21:04:15 miod Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -460,7 +460,7 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
bzero(cp_time, sizeof(cp_time));
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
for (i = 0; i < CPUSTATES; i++)
cp_time[i] += ci->ci_schedstate.spc_cp_time[i];
}
@@ -1902,7 +1902,7 @@ sysctl_cptime2(int *name, u_int namelen, void *oldp, size_t *oldlenp,
i = name[0];
- for (CPU_INFO_FOREACH(cii, ci)) {
+ CPU_INFO_FOREACH(cii, ci) {
if (i-- == 0)
break;
}