Clean-up: Remove remaining max_t macros
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 15 Dec 2021 19:23:05 +0000 (14:23 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Mar 2022 02:40:17 +0000 (22:40 -0400)
I found two remaining max_t macros. Remove them, and adjust one call
site that was still using that.

Change-Id: Icaedcaea1a88e87262bfa544691db398a1bfd203
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/ust-metadata.cpp
src/common/filter/filter-visitor-generate-bytecode.cpp

index f5c5e7a2136c9cb2a533e4f90a6f1cfa08aef811..b507f7870e687841abe139c17b1a805b42c97612 100644 (file)
 #include "ust-clock.hpp"
 #include "ust-app.hpp"
 
-#ifndef max_t
-#define max_t(type, a, b)      ((type) ((a) > (b) ? (a) : (b)))
-#endif
-
 #define NR_CLOCK_OFFSET_SAMPLES                10
 
 struct offset_sample {
@@ -69,7 +65,7 @@ ssize_t metadata_reserve(struct ust_registry_session *session, size_t len)
                char *newptr;
 
                new_alloc_len =
-                       max_t(size_t, 1U << get_count_order(new_alloc_len), old_alloc_len << 1);
+                       std::max<size_t>(1U << get_count_order(new_alloc_len), old_alloc_len << 1);
                newptr = (char *) realloc(session->metadata, new_alloc_len);
                if (!newptr)
                        return -ENOMEM;
index d7f775775530d39923c6f919988691a3425a4e3f..252a83870e87032b1ab101286c9bf89e783d2dcc 100644 (file)
 #include "filter-ast.hpp"
 #include "filter-ir.hpp"
 
-#ifndef max_t
-#define max_t(type, a, b)      ((type) ((a) > (b) ? (a) : (b)))
-#endif
-
 static
 int recursive_visit_gen_bytecode(struct filter_parser_ctx *ctx,
                struct ir_op *node);
This page took 0.025624 seconds and 4 git commands to generate.