[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 2/7] Move MIN macro to util.h so that others can use it



---
 src/util/util.c |    4 ----
 src/util/util.h |    4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/util/util.c b/src/util/util.c
index 268944d..99383d1 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -79,10 +79,6 @@
 # define NSIG 32
 #endif
 
-#ifndef MIN
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
 #define VIR_FROM_THIS VIR_FROM_NONE
 
 #define virUtilError(code, ...)                                            \
diff --git a/src/util/util.h b/src/util/util.h
index 4f0b233..6bf6bcc 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -32,6 +32,10 @@
 # include <sys/select.h>
 # include <sys/types.h>
 
+# ifndef MIN
+#  define MIN(a, b) ((a) < (b) ? (a) : (b))
+# endif
+
 int saferead(int fd, void *buf, size_t count) ATTRIBUTE_RETURN_CHECK;
 ssize_t safewrite(int fd, const void *buf, size_t count)
     ATTRIBUTE_RETURN_CHECK;
-- 
1.7.0.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]