summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2021-01-11 15:58:58 +0100
committerJeremy Allison <jra@samba.org>2021-01-22 19:54:38 +0000
commit40e4958953c8518fa779286fd96ebf36517a5bdb (patch)
tree37244e6a87457aa11788e92bf94549b4413fc5cb /ctdb
parentb417fd19675bb2d987abc768695c0b2feb1f637a (diff)
downloadsamba-40e4958953c8518fa779286fd96ebf36517a5bdb.tar.gz
lib: Make accept_recv() return struct samba_sockaddr
Avoid casting problems by using the samba_sockaddr union Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/common/sock_daemon.c2
-rw-r--r--ctdb/tests/src/comm_server_test.c2
-rw-r--r--ctdb/tests/src/fake_ctdbd.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c
index 6298653f4ec..7d026515d68 100644
--- a/ctdb/common/sock_daemon.c
+++ b/ctdb/common/sock_daemon.c
@@ -371,7 +371,7 @@ static void sock_socket_start_new_client(struct tevent_req *subreq)
struct sock_client *client;
int client_fd, ret;
- client_fd = accept_recv(subreq, NULL, NULL, &ret);
+ client_fd = accept_recv(subreq, NULL, &ret);
TALLOC_FREE(subreq);
if (client_fd == -1) {
D_ERR("failed to accept new connection\n");
diff --git a/ctdb/tests/src/comm_server_test.c b/ctdb/tests/src/comm_server_test.c
index 86b5658b949..721aa679b63 100644
--- a/ctdb/tests/src/comm_server_test.c
+++ b/ctdb/tests/src/comm_server_test.c
@@ -175,7 +175,7 @@ static void socket_process_client(struct tevent_req *subreq)
int client_fd;
int err = 0;
- client_fd = accept_recv(subreq, NULL, NULL, &err);
+ client_fd = accept_recv(subreq, NULL, &err);
TALLOC_FREE(subreq);
state->num_clients++;
diff --git a/ctdb/tests/src/fake_ctdbd.c b/ctdb/tests/src/fake_ctdbd.c
index 146b7da344c..2b2ed066f75 100644
--- a/ctdb/tests/src/fake_ctdbd.c
+++ b/ctdb/tests/src/fake_ctdbd.c
@@ -4284,7 +4284,7 @@ static void server_new_client(struct tevent_req *subreq)
int client_fd;
int ret = 0;
- client_fd = accept_recv(subreq, NULL, NULL, &ret);
+ client_fd = accept_recv(subreq, NULL, &ret);
TALLOC_FREE(subreq);
if (client_fd == -1) {
tevent_req_error(req, ret);