X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fpipe.cpp;fp=src%2Fcommon%2Fpipe.cpp;h=63a20512d9c8e5bd0fb3012fa899245debf553a3;hp=1c39ba224a983f0fd346fd4547860593bc565549;hb=cd9adb8b829564212158943a0d279bb35322ab30;hpb=e665dfbce25215d5ec77ff03a279c7163b337db1 diff --git a/src/common/pipe.cpp b/src/common/pipe.cpp index 1c39ba224..63a20512d 100644 --- a/src/common/pipe.cpp +++ b/src/common/pipe.cpp @@ -103,7 +103,7 @@ end: return ret_val; } -static struct lttng_pipe *_pipe_create(void) +static struct lttng_pipe *_pipe_create() { int ret; struct lttng_pipe *p; @@ -115,12 +115,12 @@ static struct lttng_pipe *_pipe_create(void) } 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; } - 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; @@ -131,7 +131,7 @@ error_destroy_rmutex: (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) @@ -205,7 +205,7 @@ struct lttng_pipe *lttng_pipe_open(int flags) return p; error: lttng_pipe_destroy(p); - return NULL; + return nullptr; } /* @@ -254,7 +254,7 @@ struct lttng_pipe *lttng_pipe_named_open(const char *path, mode_t mode, int flag return pipe; error: lttng_pipe_destroy(pipe); - return NULL; + return nullptr; } /*