Thread (1 message) 1 message, 1 author, 2012-08-06

Re: [PATCH] ACPI: replace strlen("string") with sizeof("string") -1

From: Andreas Schwab <hidden>
Date: 2012-08-06 10:27:13
Also in: linux-acpi, lkml

Possibly related (same subject, not in this thread)

Len Brown [off-list ref] writes:
...both give the number of chars in the string
without the '\0', as strncmp() wants,
but sizeof() is compile-time.
Does this actually change anything?  The compiler is able to expand
strlen at compile time if the argument is a constant, provided that that
builtin strlen isn't disabled.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help