projects
/
platform
/
upstream
/
lz4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a35aba6
)
Wrap likely/unlikely macroses with #ifndef
author
Dmitrii Rodionov
<d.rodionov@samsung.com>
Wed, 18 Apr 2018 09:20:56 +0000
(12:20 +0300)
committer
Dmitrii Rodionov
<d.rodionov@samsung.com>
Wed, 18 Apr 2018 09:20:56 +0000
(12:20 +0300)
It prevent redefine error when project using lz4 has its own likely/unlikely
macroses.
lib/lz4.c
patch
|
blob
|
history
diff --git
a/lib/lz4.c
b/lib/lz4.c
index
0ce05da
..
1e96931
100644
(file)
--- a/
lib/lz4.c
+++ b/
lib/lz4.c
@@
-147,8
+147,12
@@
# define expect(expr,value) (expr)
#endif
+#ifndef likely
#define likely(expr) expect((expr) != 0, 1)
+#endif
+#ifndef unlikely
#define unlikely(expr) expect((expr) != 0, 0)
+#endif
/*-************************************