projects
/
lttng-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8802e4b
)
Add max() and min() macro in common
author
Simon Marchi
<simon.marchi@polymtl.ca>
Tue, 13 Nov 2012 19:28:41 +0000
(14:28 -0500)
committer
David Goulet
<dgoulet@efficios.com>
Tue, 13 Nov 2012 19:37:28 +0000
(14:37 -0500)
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/macros.h
patch
|
blob
|
blame
|
history
diff --git
a/src/common/macros.h
b/src/common/macros.h
index 8185c85abfdacdece8bd4442cc10ca2898b8bd32..81f901c2d5d171bda6a6f064124d8c49bbf76944 100644
(file)
--- a/
src/common/macros.h
+++ b/
src/common/macros.h
@@
-52,4
+52,12
@@
#define ARRAY_SIZE(array) (sizeof(array) / (sizeof((array)[0])))
#endif
+#ifndef max
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#endif
+
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
#endif /* _MACROS_H */
This page took
0.028792 seconds
and
4
git commands to generate.