On 9/29/10 5:41 PM, Carl-Daniel Hailfinger wrote:
Replace sizeof("string")-1 with strlen("string")We want to avoid calls to strlen at runtime if the string is already known at compile time. Turns out that gcc and clang will recognize constant strings and compute the strlen result already at compile time, so trickery with sizeof only reduces readability but does not improve the code. Signed-off-by: Carl-Daniel Hailfinger<[email protected]>
Acked-by: Sean Nelson <[email protected]> _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
