projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add type-checked versions of allocation and deallocations functions
[lttng-tools.git]
/
src
/
common
/
path.cpp
diff --git
a/src/common/path.cpp
b/src/common/path.cpp
index ff2f86d652a1d2124febd59da9c5e2d3ea69bad9..61e78a5c1d7a583f11b92ce5cbe2e9da20f3c375 100644
(file)
--- a/
src/common/path.cpp
+++ b/
src/common/path.cpp
@@
-8,9
+8,9
@@
*/
#define _LGPL_SOURCE
*/
#define _LGPL_SOURCE
-#include <common/macros.h>
-#include <common/common.h>
-#include <common/path.h>
+#include <common/macros.h
pp
>
+#include <common/common.h
pp
>
+#include <common/path.h
pp
>
/*
* Return a partial realpath(3) of the path even if the full path does not
/*
* 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;
}
goto error;
}
- try_path_buf =
(char *) zmalloc
(LTTNG_PATH_MAX);
+ try_path_buf =
zmalloc<char>
(LTTNG_PATH_MAX);
if (!try_path_buf) {
PERROR("zmalloc");
goto error;
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. */
}
/* Allocate memory for the resolved path. */
- resolved_path =
(char *) zmalloc
(LTTNG_PATH_MAX);
+ resolved_path =
zmalloc<char>
(LTTNG_PATH_MAX);
if (resolved_path == NULL) {
PERROR("zmalloc resolved path");
goto error;
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 */
}
/* Allocate memory for the absolute_path */
- absolute_path =
(char *) zmalloc
(LTTNG_PATH_MAX);
+ absolute_path =
zmalloc<char>
(LTTNG_PATH_MAX);
if (absolute_path == NULL) {
PERROR("zmalloc expand path");
goto error;
if (absolute_path == NULL) {
PERROR("zmalloc expand path");
goto error;
This page took
0.025222 seconds
and
4
git commands to generate.