projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean-up: consumer.hpp: coding style indentation fix
[lttng-tools.git]
/
src
/
common
/
pipe.cpp
diff --git
a/src/common/pipe.cpp
b/src/common/pipe.cpp
index 8bf0c1ff33341e54728d3b0b196f62752fc536c6..63a20512d9c8e5bd0fb3012fa899245debf553a3 100644
(file)
--- a/
src/common/pipe.cpp
+++ b/
src/common/pipe.cpp
@@
-6,14
+6,14
@@
*/
#define _LGPL_SOURCE
*/
#define _LGPL_SOURCE
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+#include "pipe.hpp"
#include <common/common.hpp>
#include <common/common.hpp>
-#include "pipe.hpp"
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
/*
* Lock read side of a pipe.
/*
* Lock read side of a pipe.
@@
-103,7
+103,7
@@
end:
return ret_val;
}
return ret_val;
}
-static struct lttng_pipe *_pipe_create(
void
)
+static struct lttng_pipe *_pipe_create()
{
int ret;
struct lttng_pipe *p;
{
int ret;
struct lttng_pipe *p;
@@
-115,12
+115,12
@@
static struct lttng_pipe *_pipe_create(void)
}
p->fd[0] = p->fd[1] = -1;
}
p->fd[0] = p->fd[1] = -1;
- ret = pthread_mutex_init(&p->read_mutex,
NULL
);
+ ret = pthread_mutex_init(&p->read_mutex,
nullptr
);
if (ret) {
PERROR("pthread_mutex_init read lock pipe create");
goto error_destroy;
}
if (ret) {
PERROR("pthread_mutex_init read lock pipe create");
goto error_destroy;
}
- ret = pthread_mutex_init(&p->write_mutex,
NULL
);
+ ret = pthread_mutex_init(&p->write_mutex,
nullptr
);
if (ret) {
PERROR("pthread_mutex_init write lock pipe create");
goto error_destroy_rmutex;
if (ret) {
PERROR("pthread_mutex_init write lock pipe create");
goto error_destroy_rmutex;
@@
-131,7
+131,7
@@
error_destroy_rmutex:
(void) pthread_mutex_destroy(&p->read_mutex);
error_destroy:
free(p);
(void) pthread_mutex_destroy(&p->read_mutex);
error_destroy:
free(p);
- return
NULL
;
+ return
nullptr
;
}
static int _pipe_set_flags(struct lttng_pipe *pipe, int flags)
}
static int _pipe_set_flags(struct lttng_pipe *pipe, int flags)
@@
-205,7
+205,7
@@
struct lttng_pipe *lttng_pipe_open(int flags)
return p;
error:
lttng_pipe_destroy(p);
return p;
error:
lttng_pipe_destroy(p);
- return
NULL
;
+ return
nullptr
;
}
/*
}
/*
@@
-213,8
+213,7
@@
error:
*
* Return a newly allocated lttng pipe on success or else NULL.
*/
*
* Return a newly allocated lttng pipe on success or else NULL.
*/
-struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode,
- int flags)
+struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode, int flags)
{
int ret, fd_r, fd_w;
struct lttng_pipe *pipe;
{
int ret, fd_r, fd_w;
struct lttng_pipe *pipe;
@@
-255,7
+254,7
@@
struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode,
return pipe;
error:
lttng_pipe_destroy(pipe);
return pipe;
error:
lttng_pipe_destroy(pipe);
- return
NULL
;
+ return
nullptr
;
}
/*
}
/*
@@
-383,8
+382,7
@@
error:
* Return "count" on success. Return < count on error. errno can be used
* to check the actual error.
*/
* Return "count" on success. Return < count on error. errno can be used
* to check the actual error.
*/
-ssize_t lttng_pipe_write(struct lttng_pipe *pipe, const void *buf,
- size_t count)
+ssize_t lttng_pipe_write(struct lttng_pipe *pipe, const void *buf, size_t count)
{
ssize_t ret;
{
ssize_t ret;
This page took
0.023899 seconds
and
4
git commands to generate.