X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fust-metadata.cpp;fp=src%2Fbin%2Flttng-sessiond%2Fust-metadata.cpp;h=b507f7870e687841abe139c17b1a805b42c97612;hp=f5c5e7a2136c9cb2a533e4f90a6f1cfa08aef811;hb=8957eb485bb4d777f075109f6c658b842352aa68;hpb=c9e313bc594f40a86eed237dce222c0fc99c957f diff --git a/src/bin/lttng-sessiond/ust-metadata.cpp b/src/bin/lttng-sessiond/ust-metadata.cpp index f5c5e7a21..b507f7870 100644 --- a/src/bin/lttng-sessiond/ust-metadata.cpp +++ b/src/bin/lttng-sessiond/ust-metadata.cpp @@ -20,10 +20,6 @@ #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(1U << get_count_order(new_alloc_len), old_alloc_len << 1); newptr = (char *) realloc(session->metadata, new_alloc_len); if (!newptr) return -ENOMEM;