]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
util: define MAX
authorLaine Stump <laine@laine.org>
Wed, 20 Jul 2011 02:08:15 +0000 (22:08 -0400)
committerLaine Stump <laine@laine.org>
Thu, 21 Jul 2011 18:45:20 +0000 (14:45 -0400)
If util.h is going to have a MIN, it may as well also have MAX.

src/util/util.h

index e8197be0d94fbabd058ec709dd44f48f22f4af12..af8b15d8dbeead89352268569be537ae78bc2bc9 100644 (file)
@@ -35,6 +35,9 @@
 # ifndef MIN
 #  define MIN(a, b) ((a) < (b) ? (a) : (b))
 # endif
+# ifndef MAX
+#  define MAX(a, b) ((a) > (b) ? (a) : (b))
+# endif
 
 ssize_t saferead(int fd, void *buf, size_t count) ATTRIBUTE_RETURN_CHECK;
 ssize_t safewrite(int fd, const void *buf, size_t count)