projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: Remove remaining max_t macros
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
ust-metadata.cpp
diff --git
a/src/bin/lttng-sessiond/ust-metadata.cpp
b/src/bin/lttng-sessiond/ust-metadata.cpp
index abe473f27ce78c6032f4de2b5d1bc869aaa31a0b..b507f7870e687841abe139c17b1a805b42c97612 100644
(file)
--- a/
src/bin/lttng-sessiond/ust-metadata.cpp
+++ b/
src/bin/lttng-sessiond/ust-metadata.cpp
@@
-13,16
+13,12
@@
#include <limits.h>
#include <unistd.h>
#include <inttypes.h>
#include <limits.h>
#include <unistd.h>
#include <inttypes.h>
-#include <common/common.h>
-#include <common/time.h>
+#include <common/common.h
pp
>
+#include <common/time.h
pp
>
-#include "ust-registry.h"
-#include "ust-clock.h"
-#include "ust-app.h"
-
-#ifndef max_t
-#define max_t(type, a, b) ((type) ((a) > (b) ? (a) : (b)))
-#endif
+#include "ust-registry.hpp"
+#include "ust-clock.hpp"
+#include "ust-app.hpp"
#define NR_CLOCK_OFFSET_SAMPLES 10
#define NR_CLOCK_OFFSET_SAMPLES 10
@@
-69,7
+65,7
@@
ssize_t metadata_reserve(struct ust_registry_session *session, size_t len)
char *newptr;
new_alloc_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;
newptr = (char *) realloc(session->metadata, new_alloc_len);
if (!newptr)
return -ENOMEM;
@@
-106,7
+102,7
@@
int metadata_file_append(struct ust_registry_session *session,
* remaining space left in packet and write, since mutual exclusion
* protects us from concurrent writes.
*/
* remaining space left in packet and write, since mutual exclusion
* protects us from concurrent writes.
*/
-static
+static
ATTR_FORMAT_PRINTF(2, 3)
int lttng_metadata_printf(struct ust_registry_session *session,
const char *fmt, ...)
{
int lttng_metadata_printf(struct ust_registry_session *session,
const char *fmt, ...)
{
@@
-315,10
+311,10
@@
int ust_metadata_enum_statedump(struct ust_registry_session *session,
if (entry->start.signedness) {
ret = lttng_metadata_printf(session,
if (entry->start.signedness) {
ret = lttng_metadata_printf(session,
- "%
lld", (long long)
entry->start.value);
+ "%
" PRId64,
entry->start.value);
} else {
ret = lttng_metadata_printf(session,
} else {
ret = lttng_metadata_printf(session,
- "%
llu"
, entry->start.value);
+ "%
" PRIu64
, entry->start.value);
}
if (ret) {
goto end;
}
if (ret) {
goto end;
@@
-331,11
+327,11
@@
int ust_metadata_enum_statedump(struct ust_registry_session *session,
} else {
if (entry->end.signedness) {
ret = lttng_metadata_printf(session,
} else {
if (entry->end.signedness) {
ret = lttng_metadata_printf(session,
- " ... %
lld
,\n",
-
(long long)
entry->end.value);
+ " ... %
" PRId64 "
,\n",
+ entry->end.value);
} else {
ret = lttng_metadata_printf(session,
} else {
ret = lttng_metadata_printf(session,
- " ... %
llu
,\n",
+ " ... %
" PRIu64 "
,\n",
entry->end.value);
}
}
entry->end.value);
}
}
@@
-369,10
+365,6
@@
int _lttng_variant_statedump(struct ust_registry_session *session,
int ret;
char identifier[LTTNG_UST_ABI_SYM_NAME_LEN];
int ret;
char identifier[LTTNG_UST_ABI_SYM_NAME_LEN];
- if (variant->type.atype != lttng_ust_ctl_atype_variant) {
- ret = -EINVAL;
- goto end;
- }
(*iter_field)++;
sanitize_ctf_identifier(identifier, tag_name);
if (alignment) {
(*iter_field)++;
sanitize_ctf_identifier(identifier, tag_name);
if (alignment) {
This page took
0.025152 seconds
and
4
git commands to generate.