*/
#define _LGPL_SOURCE
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "lttng-relayd.hpp"
+#include "utils.hpp"
#include <common/common.hpp>
#include <common/defaults.hpp>
-#include <common/utils.hpp>
#include <common/path.hpp>
+#include <common/utils.hpp>
-#include "lttng-relayd.hpp"
-#include "utils.hpp"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
static char *create_output_path_auto(const char *path_name)
{
int ret;
- char *traces_path = NULL;
+ char *traces_path = nullptr;
const char *default_path;
default_path = utils_get_home_dir();
- if (default_path == NULL) {
+ if (default_path == nullptr) {
ERR("Home path not found.\n \
Please specify an output path using -o, --output PATH");
goto exit;
}
- ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
- "/%s", default_path, path_name);
+ ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME "/%s", default_path, path_name);
if (ret < 0) {
PERROR("asprintf trace dir name");
goto exit;
static char *create_output_path_noauto(const char *path_name)
{
int ret;
- char *traces_path = NULL;
+ char *traces_path = nullptr;
char *full_path;
full_path = utils_expand_path(opt_output_path);
{
LTTNG_ASSERT(path_name);
- if (opt_output_path == NULL) {
+ if (opt_output_path == nullptr) {
return create_output_path_auto(path_name);
} else {
return create_output_path_noauto(path_name);