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

Jiri Denemark jdenemar at redhat.com
Tue Apr 20 12:42:00 UTC 2010


---
 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




More information about the libvir-list mailing list