diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-06-26 11:50:10 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2011-06-26 11:50:10 +0000 |
commit | 22a758394c4ab12c43497c1a0a27b0b75c09b00b (patch) | |
tree | 07237d27fe48976a6a05894468d7daf7e5275761 /sst28sf040.c | |
parent | bb186cff959edda7b820254146447020921b97f5 (diff) | |
download | flashrom-22a758394c4ab12c43497c1a0a27b0b75c09b00b.tar.gz |
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 <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1352 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'sst28sf040.c')
0 files changed, 0 insertions, 0 deletions