X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fpath.cpp;h=61e78a5c1d7a583f11b92ce5cbe2e9da20f3c375;hb=e35e95ea77196e8997a02eda4bb8c1c5c6cba0fb;hp=ff2f86d652a1d2124febd59da9c5e2d3ea69bad9;hpb=4971b7f0243bd3a7a661bcf1cfe95f0f8014b59b;p=lttng-tools.git diff --git a/src/common/path.cpp b/src/common/path.cpp index ff2f86d65..61e78a5c1 100644 --- a/src/common/path.cpp +++ b/src/common/path.cpp @@ -8,9 +8,9 @@ */ #define _LGPL_SOURCE -#include -#include -#include +#include +#include +#include /* * Return a partial realpath(3) of the path even if the full path does not @@ -70,7 +70,7 @@ char *utils_partial_realpath(const char *path) goto error; } - try_path_buf = (char *) zmalloc(LTTNG_PATH_MAX); + try_path_buf = zmalloc(LTTNG_PATH_MAX); if (!try_path_buf) { PERROR("zmalloc"); goto error; @@ -108,7 +108,7 @@ char *utils_partial_realpath(const char *path) } /* Allocate memory for the resolved path. */ - resolved_path = (char *) zmalloc(LTTNG_PATH_MAX); + resolved_path = zmalloc(LTTNG_PATH_MAX); if (resolved_path == NULL) { PERROR("zmalloc resolved path"); goto error; @@ -288,7 +288,7 @@ char *_utils_expand_path(const char *path, bool keep_symlink) } /* Allocate memory for the absolute_path */ - absolute_path = (char *) zmalloc(LTTNG_PATH_MAX); + absolute_path = zmalloc(LTTNG_PATH_MAX); if (absolute_path == NULL) { PERROR("zmalloc expand path"); goto error;