You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2019/06/07 20:09:22 UTC

[qpid-dispatch] 02/02: Move MIN macro to common ctools.h; Add MAX macro

This is an automated email from the ASF dual-hosted git repository.

chug pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 95c8f41bf488873e0d89786e7db2afcb96d51af8
Author: Chuck Rolke <ch...@apache.org>
AuthorDate: Fri Jun 7 15:21:32 2019 -0400

    Move MIN macro to common ctools.h; Add MAX macro
---
 include/qpid/dispatch/ctools.h | 3 +++
 src/parse.c                    | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/qpid/dispatch/ctools.h b/include/qpid/dispatch/ctools.h
index 355f3d3..e883c03 100644
--- a/include/qpid/dispatch/ctools.h
+++ b/include/qpid/dispatch/ctools.h
@@ -214,4 +214,7 @@ do {                                    \
 } while (0)
 #define DEQ_APPEND(d1,d2) DEQ_APPEND_N(,d1,d2)
 
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
 #endif
diff --git a/src/parse.c b/src/parse.c
index 0672b0c..35a6951 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -725,8 +725,6 @@ const char *qd_parse_annotations_v1(
     // define a shorthand name for the qd message annotation key prefix length
 #define QMPL QD_MA_PREFIX_LEN
 
-#define MIN(a,b) (((a)<(b))?(a):(b))
-
     // trace, phase, and class keys are all the same length
     assert(QD_MA_TRACE_LEN == QD_MA_PHASE_LEN);
     assert(QD_MA_TRACE_LEN == QD_MA_CLASS_LEN);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org