Commit Graph

3 Commits (a9ffd82116fb043cf8e0b4d11d420f9d52d1cba2)

Author SHA1 Message Date
Eric Leblond e176be6fcc Use unlikely for error treatment.
When handling error case on SCMallog, SCCalloc or SCStrdup
we are in an unlikely case. This patch adds the unlikely()
expression to indicate this to gcc.

This patch has been obtained via coccinelle. The transformation
is the following:

@istested@
identifier x;
statement S1;
identifier func =~ "(SCMalloc|SCStrdup|SCCalloc)";
@@

x = func(...)
... when != x
- if (x == NULL) S1
+ if (unlikely(x == NULL)) S1
13 years ago
Victor Julien 250c4e9310 file: convert filesize to new FileMatch api. 13 years ago
Victor Julien 8f71333e12 file: implement filesize keyword. #489. 13 years ago