projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: utils: unhandled close return value
[lttng-tools.git]
/
src
/
common
/
fd-handle.cpp
diff --git
a/src/common/fd-handle.cpp
b/src/common/fd-handle.cpp
index d8b5b785d11679d25d045a08e4df0e93592c7072..8a0d95243bcdfebf4035da2981ff13cbaed454d9 100644
(file)
--- a/
src/common/fd-handle.cpp
+++ b/
src/common/fd-handle.cpp
@@
-8,8
+8,8
@@
#include <unistd.h>
#include <urcu/ref.h>
#include <unistd.h>
#include <urcu/ref.h>
-#include "fd-handle.h"
-#include <common/error.h>
+#include "fd-handle.h
pp
"
+#include <common/error.h
pp
>
struct fd_handle {
struct urcu_ref ref;
struct fd_handle {
struct urcu_ref ref;
@@
-19,7
+19,7
@@
struct fd_handle {
static void fd_handle_release(struct urcu_ref *ref)
{
int ret;
static void fd_handle_release(struct urcu_ref *ref)
{
int ret;
- struct fd_handle *handle =
container_of(ref, struct fd_handle,
ref);
+ struct fd_handle *handle =
lttng::utils::container_of(ref, &fd_handle::
ref);
LTTNG_ASSERT(handle->fd >= 0);
ret = close(handle->fd);
LTTNG_ASSERT(handle->fd >= 0);
ret = close(handle->fd);
@@
-41,7
+41,7
@@
struct fd_handle *fd_handle_create(int fd)
goto end;
}
goto end;
}
- handle =
(fd_handle *) zmalloc(sizeof(*handle)
);
+ handle =
zmalloc<fd_handle>(
);
if (!handle) {
PERROR("Failed to allocate fd_handle");
goto end;
if (!handle) {
PERROR("Failed to allocate fd_handle");
goto end;
This page took
0.025021 seconds
and
4
git commands to generate.