Messages in this thread | | | Date | Mon, 30 Jul 2012 16:41:48 +0200 | Subject | Re: [PATCH] ACPI: replace strlen("string") with sizeof("string") -1 | From | richard -rw- weinberger <> |
| |
On Mon, Jul 30, 2012 at 4:26 PM, Ian Campbell <ijc@hellion.org.uk> wrote: > I thought gcc optimised strlen("string literal") into a compile time > constant too. It does in a little userspace test I just wrote, but I > didn't look at its behaviour with the kernel's strlen.
It depends whether you use the built-in strlen() or not. AFAIK the kernel does not use the built-in variant.
-- Thanks, //richard
| |