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
/
sessiond-comm
/
sessiond-comm.cpp
diff --git
a/src/common/sessiond-comm/sessiond-comm.cpp
b/src/common/sessiond-comm/sessiond-comm.cpp
index 24db516376c5904bae9c5586cab75aba74cf08c2..ed14a9e63ec7af3f721a80d4ee7b1d53d7429eaa 100644
(file)
--- a/
src/common/sessiond-comm/sessiond-comm.cpp
+++ b/
src/common/sessiond-comm/sessiond-comm.cpp
@@
-17,17
+17,17
@@
#include <unistd.h>
#include <inttypes.h>
#include <unistd.h>
#include <inttypes.h>
-#include <common/common.h>
-#include <common/compat/errno.h>
+#include <common/common.h
pp
>
+#include <common/compat/errno.h
pp
>
-#include "sessiond-comm.h"
+#include "sessiond-comm.h
pp
"
/* For Unix socket */
/* For Unix socket */
-#include <common/unix.h>
+#include <common/unix.h
pp
>
/* For Inet socket */
/* For Inet socket */
-#include "inet.h"
+#include "inet.h
pp
"
/* For Inet6 socket */
/* For Inet6 socket */
-#include "inet6.h"
+#include "inet6.h
pp
"
#define NETWORK_TIMEOUT_ENV "LTTNG_NETWORK_SOCKET_TIMEOUT"
#define NETWORK_TIMEOUT_ENV "LTTNG_NETWORK_SOCKET_TIMEOUT"
@@
-178,9
+178,8
@@
error:
*/
struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto)
{
*/
struct lttcomm_sock *lttcomm_alloc_sock(enum lttcomm_sock_proto proto)
{
- struct lttcomm_sock *sock;
+ struct lttcomm_sock *sock
= zmalloc<lttcomm_sock>()
;
- sock = (lttcomm_sock *) zmalloc(sizeof(lttcomm_sock));
if (sock == NULL) {
PERROR("zmalloc create sock");
goto end;
if (sock == NULL) {
PERROR("zmalloc create sock");
goto end;
@@
-366,11
+365,10
@@
struct lttcomm_relayd_sock *lttcomm_alloc_relayd_sock(struct lttng_uri *uri,
{
int ret;
struct lttcomm_sock *tmp_sock = NULL;
{
int ret;
struct lttcomm_sock *tmp_sock = NULL;
- struct lttcomm_relayd_sock *rsock =
NULL
;
+ struct lttcomm_relayd_sock *rsock =
zmalloc<lttcomm_relayd_sock>()
;
LTTNG_ASSERT(uri);
LTTNG_ASSERT(uri);
- rsock = (lttcomm_relayd_sock *) zmalloc(sizeof(*rsock));
if (!rsock) {
PERROR("zmalloc relayd sock");
goto error;
if (!rsock) {
PERROR("zmalloc relayd sock");
goto error;
@@
-524,7
+522,7
@@
int lttcomm_populate_sock_from_open_socket(
{
int ret = 0;
socklen_t storage_len;
{
int ret = 0;
socklen_t storage_len;
- struct sockaddr_storage storage = {
0
};
+ struct sockaddr_storage storage = {};
assert(sock);
assert(fd >= 0);
assert(sock);
assert(fd >= 0);
This page took
0.041775 seconds
and
4
git commands to generate.