make some functions static, and remove an unused structure
authorAndrew Tridgell <tridge@samba.org>
Tue, 10 Apr 2007 09:40:29 +0000 (19:40 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 10 Apr 2007 09:40:29 +0000 (19:40 +1000)
common/ctdb_daemon.c
tcp/tcp_connect.c
tcp/tcp_init.c

index f2a8e8462ad31d28a868e21ae8bf5b20dac95ac3..0908b8c99298d0860c8318f634e5cb042776c557 100644 (file)
@@ -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);
 }
index bccc8a63aa0572e4596fbe5526f26c73ad143215..d21720758bf9f0c85740fcc5d03efd0fa5bbcd16 100644 (file)
@@ -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, 
index 0ab12790d49835453cd391ee97555fb8c057b4a0..52a6f2bcc7e44d0578db6e7831efe24ccaa9bee6 100644 (file)
@@ -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