projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sync ax_have_epoll.m4 with autoconf-archive
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
utils.c
diff --git
a/src/bin/lttng-relayd/utils.c
b/src/bin/lttng-relayd/utils.c
index 837c828d22b935cb7eb353a60f6d3e93f2dc277d..db124bc354515c22f5eef55e89a1527e6b55c9ce 100644
(file)
--- a/
src/bin/lttng-relayd/utils.c
+++ b/
src/bin/lttng-relayd/utils.c
@@
-33,8
+33,7
@@
static char *create_output_path_auto(const char *path_name)
{
int ret;
char *traces_path = NULL;
{
int ret;
char *traces_path = NULL;
- char *alloc_path = NULL;
- char *default_path;
+ const char *default_path;
default_path = utils_get_home_dir();
if (default_path == NULL) {
default_path = utils_get_home_dir();
if (default_path == NULL) {
@@
-42,19
+41,13
@@
static char *create_output_path_auto(const char *path_name)
Please specify an output path using -o, --output PATH");
goto exit;
}
Please specify an output path using -o, --output PATH");
goto exit;
}
- alloc_path = strdup(default_path);
- if (alloc_path == NULL) {
- PERROR("Path allocation");
- goto exit;
- }
ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
ret = asprintf(&traces_path, "%s/" DEFAULT_TRACE_DIR_NAME
- "/%s",
alloc
_path, path_name);
+ "/%s",
default
_path, path_name);
if (ret < 0) {
PERROR("asprintf trace dir name");
goto exit;
}
exit:
if (ret < 0) {
PERROR("asprintf trace dir name");
goto exit;
}
exit:
- free(alloc_path);
return traces_path;
}
return traces_path;
}
This page took
0.025703 seconds
and
4
git commands to generate.