Hi all,
I noticed that Linux always subtracts 1 byte when using sizeof in macros, despite the length of the macro.
For instance:
Is there a special rule on that? How Linux know that the sizeof() a macro will always have an extra byte?Code:#define ACPI_SIG_RSDP "RSD PTR " (strncmp(rsdp->signature, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1)) #define ACPI_SIG_XSDT "XSDT" (strncmp(hdr->signature, ACPI_SIG_XSDT, sizeof(ACPI_SIG_XSDT) - 1))
Thnaks in advance.