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

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

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]