Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146965378
D9940.id26109.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9940.id26109.diff
View Options
Index: usr.sbin/acpi/acpidump/acpi.c
===================================================================
--- usr.sbin/acpi/acpidump/acpi.c
+++ usr.sbin/acpi/acpidump/acpi.c
@@ -420,7 +420,7 @@
ACPI_MADT_GENERIC_REDISTRIBUTOR *gicr;
ACPI_MADT_GENERIC_TRANSLATOR *gict;
- if (mp->Type < sizeof(apic_types) / sizeof(apic_types[0]))
+ if (mp->Type < nitems(apic_types))
printf("\tType=%s\n", apic_types[mp->Type]);
else
printf("\tType=%d (unknown)\n", mp->Type);
@@ -470,8 +470,7 @@
break;
case ACPI_MADT_TYPE_INTERRUPT_SOURCE:
isrc = (ACPI_MADT_INTERRUPT_SOURCE *)mp;
- if (isrc->Type < sizeof(platform_int_types) /
- sizeof(platform_int_types[0]))
+ if (isrc->Type < nitems(platform_int_types))
printf("\tType=%s\n", platform_int_types[isrc->Type]);
else
printf("\tType=%d (unknown)\n", isrc->Type);
@@ -1082,7 +1081,7 @@
ACPI_SRAT_X2APIC_CPU_AFFINITY *x2apic;
ACPI_SRAT_GICC_AFFINITY *gic;
- if (srat->Type < sizeof(srat_types) / sizeof(srat_types[0]))
+ if (srat->Type < nitems(srat_types))
printf("\tType=%s\n", srat_types[srat->Type]);
else
printf("\tType=%d (unknown)\n", srat->Type);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 5:04 AM (6 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29390885
Default Alt Text
D9940.id26109.diff (1 KB)
Attached To
Mode
D9940: Use nitems() from sys/param.h
Attached
Detach File
Event Timeline
Log In to Comment