projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f619e0f
)
When doing micro-optimisations, then go all the way: Use memcmp() instead of strncmp().
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 14 Sep 2011 09:18:52 +0000
(11:18 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 14 Sep 2011 09:18:52 +0000
(11:18 +0200)
driver/firm_opt.c
patch
|
blob
|
history
diff --git
a/driver/firm_opt.c
b/driver/firm_opt.c
index
50beb48
..
13ec9a0
100644
(file)
--- a/
driver/firm_opt.c
+++ b/
driver/firm_opt.c
@@
-931,7
+931,7
@@
int firm_option(const char *const opt)
size_t const len = strlen(opt);
for (size_t i = lengthof(firm_options); i != 0;) {
struct params const* const o = &firm_options[--i];
- if (len == o->opt_len &&
strn
cmp(opt, o->option, len) == 0) {
+ if (len == o->opt_len &&
mem
cmp(opt, o->option, len) == 0) {
/* statistic options do accumulate */
if (o->flag == &firm_dump.statistic)
*o->flag = (bool) (*o->flag | o->set);