projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Run clang-format on the whole tree
[lttng-tools.git]
/
src
/
common
/
fd-handle.cpp
diff --git
a/src/common/fd-handle.cpp
b/src/common/fd-handle.cpp
index 8a0d95243bcdfebf4035da2981ff13cbaed454d9..6bc1e9b5246e4ab3d6a7bfa0ef342e9c94edf065 100644
(file)
--- a/
src/common/fd-handle.cpp
+++ b/
src/common/fd-handle.cpp
@@
-5,12
+5,13
@@
*
*/
*
*/
-#include <unistd.h>
-#include <urcu/ref.h>
-
#include "fd-handle.hpp"
#include "fd-handle.hpp"
+
#include <common/error.hpp>
#include <common/error.hpp>
+#include <unistd.h>
+#include <urcu/ref.h>
+
struct fd_handle {
struct urcu_ref ref;
int fd;
struct fd_handle {
struct urcu_ref ref;
int fd;
@@
-25,7
+26,7
@@
static void fd_handle_release(struct urcu_ref *ref)
ret = close(handle->fd);
if (ret == -1) {
PERROR("Failed to close file descriptor of fd_handle upon release: fd = %d",
ret = close(handle->fd);
if (ret == -1) {
PERROR("Failed to close file descriptor of fd_handle upon release: fd = %d",
-
handle->fd);
+ handle->fd);
}
free(handle);
}
free(handle);
@@
-37,7
+38,7
@@
struct fd_handle *fd_handle_create(int fd)
if (fd < 0) {
ERR("Attempted to create an fd_handle from an invalid file descriptor: fd = %d",
if (fd < 0) {
ERR("Attempted to create an fd_handle from an invalid file descriptor: fd = %d",
-
fd);
+ fd);
goto end;
}
goto end;
}
@@
-84,7
+85,8
@@
struct fd_handle *fd_handle_copy(const struct fd_handle *handle)
const int new_fd = dup(handle->fd);
if (new_fd < 0) {
const int new_fd = dup(handle->fd);
if (new_fd < 0) {
- PERROR("Failed to duplicate file descriptor while copying fd_handle: fd = %d", handle->fd);
+ PERROR("Failed to duplicate file descriptor while copying fd_handle: fd = %d",
+ handle->fd);
goto end;
}
goto end;
}
This page took
0.022877 seconds
and
4
git commands to generate.