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
/
compat
/
directory-handle.cpp
diff --git
a/src/common/compat/directory-handle.cpp
b/src/common/compat/directory-handle.cpp
index ba5c6925c49feb3667f61e60ea0450507e19fe71..5c8d28db9de6db30e95589cfa074edb76784961c 100644
(file)
--- a/
src/common/compat/directory-handle.cpp
+++ b/
src/common/compat/directory-handle.cpp
@@
-147,7
+147,7
@@
struct lttng_directory_handle *lttng_directory_handle_create_from_dirfd(
int dirfd)
{
int ret;
int dirfd)
{
int ret;
- struct lttng_directory_handle *handle =
(lttng_directory_handle *) zmalloc(sizeof(*handle)
);
+ struct lttng_directory_handle *handle =
zmalloc<lttng_directory_handle>(
);
struct stat stat_buf;
if (!handle) {
struct stat stat_buf;
if (!handle) {
@@
-405,7
+405,7
@@
end:
static
struct lttng_directory_handle *_lttng_directory_handle_create(char *path)
{
static
struct lttng_directory_handle *_lttng_directory_handle_create(char *path)
{
- struct lttng_directory_handle *handle = zmalloc
(sizeof(*handle)
);
+ struct lttng_directory_handle *handle = zmalloc
<lttng_directory_handle>(
);
if (!handle) {
goto end;
if (!handle) {
goto end;
@@
-525,7
+525,7
@@
struct lttng_directory_handle *lttng_directory_handle_create_from_handle(
handle_path_len, LTTNG_PATH_MAX);
goto end;
}
handle_path_len, LTTNG_PATH_MAX);
goto end;
}
- new_path = zmalloc(handle_path_len);
+ new_path = zmalloc
<char>
(handle_path_len);
if (!new_path) {
PERROR("Failed to initialize directory handle");
goto end;
if (!new_path) {
PERROR("Failed to initialize directory handle");
goto end;
This page took
0.024475 seconds
and
4
git commands to generate.