On Tuesday 18 April 2006 16:29, Moore, Robert wrote:
> Actually, I find this even more readable:
> #define ACPI_NUM_OSI_STRINGS ACPI_ARRAY_SIZE (acpi_valid_osi_strings)
>
> and leave the existing code as:
> for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) {
The typical Linux style is to use
for (i = 0; i < ARRAY_SIZE(acpi_valid_osi_strings); i++) {
rather than
for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) {
because you can easily verify the loop bounds without having
to look up ACPI_NUM_OSI_STRINGS, which is defined elsewhere.
But you have to use your own judgment.
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html