From 5861917468b543824e1093ea5d94bc4592368b9c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Apr 2007 19:40:29 +1000 Subject: [PATCH] make some functions static, and remove an unused structure (This used to be ctdb commit 8d09cac96b2c604a68e4903346cc9db3a66d80da) --- ctdb/common/ctdb_daemon.c | 8 +------- ctdb/tcp/tcp_connect.c | 2 +- ctdb/tcp/tcp_init.c | 6 +++--- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/ctdb/common/ctdb_daemon.c b/ctdb/common/ctdb_daemon.c index f2a8e8462ad..0908b8c9929 100644 --- a/ctdb/common/ctdb_daemon.c +++ b/ctdb/common/ctdb_daemon.c @@ -417,16 +417,10 @@ static void *ctdbd_allocate_pkt(struct ctdb_context *ctdb, size_t len) } -struct ctdbd_queue_packet { - struct ctdbd_queue_packet *next, *prev; - uint8_t *data; - uint32_t length; -}; - /* queue a packet for sending */ -int ctdbd_queue_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) +static int ctdbd_queue_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) { return ctdb_queue_send(ctdb->daemon.queue, (uint8_t *)hdr, hdr->length); } diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c index bccc8a63aa0..d21720758bf 100644 --- a/ctdb/tcp/tcp_connect.c +++ b/ctdb/tcp/tcp_connect.c @@ -37,7 +37,7 @@ static void set_nonblocking(int fd) /* called when a complete packet has come in - should not happen on this socket */ -void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private) +static void ctdb_tcp_tnode_cb(uint8_t *data, size_t cnt, void *private) { struct ctdb_node *node = talloc_get_type(private, struct ctdb_node); struct ctdb_tcp_node *tnode = talloc_get_type(node->private, diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index 0ab12790d49..52a6f2bcc7e 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -29,7 +29,7 @@ /* start the protocol going */ -int ctdb_tcp_start(struct ctdb_context *ctdb) +static int ctdb_tcp_start(struct ctdb_context *ctdb) { int i; @@ -59,7 +59,7 @@ int ctdb_tcp_start(struct ctdb_context *ctdb) /* initialise tcp portion of a ctdb node */ -int ctdb_tcp_add_node(struct ctdb_node *node) +static int ctdb_tcp_add_node(struct ctdb_node *node) { struct ctdb_tcp_node *tnode; tnode = talloc_zero(node, struct ctdb_tcp_node); @@ -74,7 +74,7 @@ int ctdb_tcp_add_node(struct ctdb_node *node) /* transport packet allocator - allows transport to control memory for packets */ -void *ctdb_tcp_allocate_pkt(struct ctdb_context *ctdb, size_t size) +static void *ctdb_tcp_allocate_pkt(struct ctdb_context *ctdb, size_t size) { /* tcp transport needs to round to 8 byte alignment to ensure that we can use a length header and 64 bit elements in