From: Jim Meyering <[email protected]>
* exec/main.c (sigintr_handler, serialize_lock, serialize_unlock):
(serialize_lock, serialize_unlock):
* exec/sync.c (sync_start_init, sync_callbacks_load):
* exec/vsf_ykd.c (ykd_state_init):
* lcr/uis.c (cmd1):
* services/pload.c (send_message, token_callback, start_mcasting):
* tools/corosync-cfgtool.c (service_load_do, service_unload_do):
(shutdown_do, showaddrs_do, killnode_do, usage_do):
* tools/corosync-fplay.c (totemip_print, print_string_len):
(sync_printer_confchg_set_sync, sync_printer_set_sync_state):
(sync_printer_process_currentstate):
(sync_printer_process_get_shouldsync):
(sync_printer_checkpoint_release):
(sync_printer_checkpoint_transmit, sync_printer_section_transmit):
(sync_printer_checkpoint_receive, sync_printer_section_receive):
(sync_printer_nada, sync_printer_confchg_fn):
(printer_totemsrp_mcast, printer_totemsrp_delv):
(printer_totempg_mcast_fits, sync_printer_service_process):
* tools/corosync-objctl.c (get_child_name, get_parent_name):
(get_key):
---
exec/main.c | 13 +++++++------
exec/sync.c | 6 +++---
exec/vsf_ykd.c | 2 +-
lcr/uis.c | 2 +-
services/pload.c | 6 +++---
tools/corosync-cfgtool.c | 12 ++++++------
tools/corosync-fplay.c | 36 ++++++++++++++++++------------------
tools/corosync-objctl.c | 7 +++----
8 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/exec/main.c b/exec/main.c
index f0a7c30..d427cbc 100644
--- a/exec/main.c
+++ b/exec/main.c
@@ -199,9 +199,10 @@ struct totempg_group corosync_group = {
.group_len = 1
};
-void sigintr_handler (int signum)
+static void sigintr_handler (int signum)
{
- poll_timer_add (corosync_poll_handle, 500, NULL, init_shutdown,
&shutdown_handle);
+ poll_timer_add (corosync_poll_handle, 500, NULL,
+ init_shutdown, &shutdown_handle);
}
@@ -210,22 +211,22 @@ static int pool_sizes[] = { 0, 0, 0, 0, 0, 4096, 0, 1, 0,
/* 256 */
1, 1, 1, 1, 1, 1, 1, 1, 1 };
#if defined(HAVE_PTHREAD_SPIN_LOCK)
-void serialize_lock (void)
+static void serialize_lock (void)
{
pthread_spin_lock (&serialize_spin);
}
-void serialize_unlock (void)
+static void serialize_unlock (void)
{
pthread_spin_unlock (&serialize_spin);
}
#else
-void serialize_lock (void)
+static void serialize_lock (void)
{
pthread_mutex_lock (&serialize_mutex);
}
-void serialize_unlock (void)
+static void serialize_unlock (void)
{
pthread_mutex_unlock (&serialize_mutex);
}
diff --git a/exec/sync.c b/exec/sync.c
index 0f69f88..51b3086 100644
--- a/exec/sync.c
+++ b/exec/sync.c
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2005-2006 MontaVista Software, Inc.
- * Copyright (c) 2006-2007 Red Hat, Inc.
+ * Copyright (c) 2006-2007, 2009 Red Hat, Inc.
*
* All rights reserved.
*
@@ -166,7 +166,7 @@ static int sync_barrier_send (struct memb_ring_id *ring_id)
return (res);
}
-void sync_start_init (struct memb_ring_id *ring_id)
+static void sync_start_init (struct memb_ring_id *ring_id)
{
totempg_callback_token_create (
&sync_callback_token_handle,
@@ -207,7 +207,7 @@ static int sync_start_process (enum
totem_callback_token_type type, void *data)
return (0);
}
-void sync_callbacks_load (void)
+static void sync_callbacks_load (void)
{
int res;
diff --git a/exec/vsf_ykd.c b/exec/vsf_ykd.c
index 9542fa4..eff9d02 100644
--- a/exec/vsf_ykd.c
+++ b/exec/vsf_ykd.c
@@ -150,7 +150,7 @@ static void (*ykd_primary_callback_fn) (
int primary_designated,
struct memb_ring_id *ring_id) = NULL;
-void ykd_state_init (void)
+static void ykd_state_init (void)
{
ykd_state.session_id = 0;
ykd_state.last_formed_entries = 0;
diff --git a/lcr/uis.c b/lcr/uis.c
index c5d22a3..02ec843 100755
--- a/lcr/uis.c
+++ b/lcr/uis.c
@@ -108,7 +108,7 @@ struct uis_commands {
void (*cmd_handler) (char *);
};
-void cmd1 (char *cmd) {
+static void cmd1 (char *cmd) {
printf ("cmd1 executed with cmd line %s\n", cmd);
}
diff --git a/services/pload.c b/services/pload.c
index 2ba47ca..6a72a95 100644
--- a/services/pload.c
+++ b/services/pload.c
@@ -258,7 +258,7 @@ static void req_exec_pload_mcast_endian_convert (void *msg)
{
}
-int send_message (enum totem_callback_token_type type, void *arg)
+static int send_message (enum totem_callback_token_type type, void *arg)
{
struct req_exec_pload_mcast req_exec_pload_mcast;
struct iovec iov[2];
@@ -293,8 +293,8 @@ int send_message (enum totem_callback_token_type type, void
*arg)
}
}
-void *token_callback;
-void start_mcasting (void)
+static void *token_callback;
+static void start_mcasting (void)
{
api->totem_callback_token_create (
&token_callback,
diff --git a/tools/corosync-cfgtool.c b/tools/corosync-cfgtool.c
index 783f05e..da02619 100644
--- a/tools/corosync-cfgtool.c
+++ b/tools/corosync-cfgtool.c
@@ -113,7 +113,7 @@ static void ringreenable_do (void)
(void)corosync_cfg_finalize (handle);
}
-void service_load_do (char *service, unsigned int version)
+static void service_load_do (const char *service, unsigned int version)
{
cs_error_t result;
corosync_cfg_handle_t handle;
@@ -131,7 +131,7 @@ void service_load_do (char *service, unsigned int version)
(void)corosync_cfg_finalize (handle);
}
-void service_unload_do (char *service, unsigned int version)
+static void service_unload_do (const char *service, unsigned int version)
{
cs_error_t result;
corosync_cfg_handle_t handle;
@@ -149,7 +149,7 @@ void service_unload_do (char *service, unsigned int version)
(void)corosync_cfg_finalize (handle);
}
-void shutdown_do(void)
+static void shutdown_do(void)
{
cs_error_t result;
corosync_cfg_handle_t handle;
@@ -172,7 +172,7 @@ void shutdown_do(void)
(void)corosync_cfg_finalize (handle);
}
-void showaddrs_do(int nodeid)
+static void showaddrs_do(int nodeid)
{
cs_error_t result;
corosync_cfg_handle_t handle;
@@ -211,7 +211,7 @@ void showaddrs_do(int nodeid)
(void)corosync_cfg_finalize (handle);
}
-void killnode_do(unsigned int nodeid)
+static void killnode_do(unsigned int nodeid)
{
cs_error_t result;
corosync_cfg_handle_t handle;
@@ -230,7 +230,7 @@ void killnode_do(unsigned int nodeid)
}
-void usage_do (void)
+static void usage_do (void)
{
printf ("corosync-cfgtool [-s] [-r] [-l] [-u] [-H] [service_name] [-v]
[version] [-k] [nodeid] [-a] [nodeid]\n\n");
printf ("A tool for displaying and configuring active parameters within
corosync.\n");
diff --git a/tools/corosync-fplay.c b/tools/corosync-fplay.c
index a24eaba..cd00158 100644
--- a/tools/corosync-fplay.c
+++ b/tools/corosync-fplay.c
@@ -38,14 +38,14 @@ struct memb_ring_id {
unsigned long long seq;
} __attribute__((packed));
-const char *totemip_print(struct totem_ip_address *addr)
+static const char *totemip_print(const struct totem_ip_address *addr)
{
static char buf[INET6_ADDRSTRLEN];
return inet_ntop(addr->family, addr->addr, buf, sizeof(buf));
}
-char *print_string_len (unsigned char *str, unsigned int len)
+static char *print_string_len (const unsigned char *str, unsigned int len)
{
unsigned int i;
static char buf[1024];
@@ -56,31 +56,31 @@ char *print_string_len (unsigned char *str, unsigned int
len)
return (buf);
}
-void sync_printer_confchg_set_sync (void **record)
+static void sync_printer_confchg_set_sync (void **record)
{
unsigned int *my_should_sync = record[0];
printf ("Setting my_should_sync to %d\n", *my_should_sync);
}
-void sync_printer_set_sync_state (void **record)
+static void sync_printer_set_sync_state (void **record)
{
unsigned int *my_sync_state = record[0];
printf ("Setting my_sync_state to %d\n", *my_sync_state);
}
-void sync_printer_process_currentstate (void **record)
+static void sync_printer_process_currentstate (void **record)
{
unsigned int *my_sync_state = record[0];
printf ("Retrieving my_sync_state %d\n", *my_sync_state);
}
-void sync_printer_process_get_shouldsync (void **record)
+static void sync_printer_process_get_shouldsync (void **record)
{
unsigned int *my_should_sync = record[0];
printf ("Getting my_should_sync %d\n", *my_should_sync);
}
-void sync_printer_checkpoint_release (void **record)
+static void sync_printer_checkpoint_release (void **record)
{
unsigned char *name = record[0];
uint16_t *name_len = record[1];
@@ -94,7 +94,7 @@ void sync_printer_checkpoint_release (void **record)
*name_len);
}
-void sync_printer_checkpoint_transmit (void **record)
+static void sync_printer_checkpoint_transmit (void **record)
{
unsigned char *name = record[0];
uint16_t *name_len = record[1];
@@ -106,7 +106,7 @@ void sync_printer_checkpoint_transmit (void **record)
*ckpt_id);
}
-void sync_printer_section_transmit (void **record)
+static void sync_printer_section_transmit (void **record)
{
unsigned char *ckpt_name = record[0];
uint16_t *name_len = record[1];
@@ -121,7 +121,7 @@ void sync_printer_section_transmit (void **record)
printf ("section=[%s]\n",
print_string_len (section_name, *section_name_len));
}
-void sync_printer_checkpoint_receive (void **record)
+static void sync_printer_checkpoint_receive (void **record)
{
unsigned char *ckpt_name = record[0];
uint16_t *name_len = record[1];
@@ -132,7 +132,7 @@ void sync_printer_checkpoint_receive (void **record)
*xmit_id, print_string_len (ckpt_name, *name_len), *ckpt_id);
}
-void sync_printer_section_receive (void **record)
+static void sync_printer_section_receive (void **record)
{
unsigned char *ckpt_name = record[0];
uint16_t *name_len = record[1];
@@ -149,11 +149,11 @@ void sync_printer_section_receive (void **record)
print_string_len (section_name, *section_name_len));
}
-void sync_printer_nada (void **record)
+static void sync_printer_nada (void **record)
{
-printf ("nada\n");
+ printf ("nada\n");
}
-void sync_printer_confchg_fn (void **record)
+static void sync_printer_confchg_fn (void **record)
{
unsigned int i;
@@ -172,21 +172,21 @@ void sync_printer_confchg_fn (void **record)
}
}
-void printer_totemsrp_mcast (void **record)
+static void printer_totemsrp_mcast (void **record)
{
unsigned int *msgid = record[0];
printf ("totemsrp_mcast %d\n", *msgid);
}
-void printer_totemsrp_delv (void **record)
+static void printer_totemsrp_delv (void **record)
{
unsigned int *msgid = record[0];
printf ("totemsrp_delv %d\n", *msgid);
}
-void printer_totempg_mcast_fits (void **record)
+static void printer_totempg_mcast_fits (void **record)
{
unsigned int *index = record[0];
unsigned int *iov_len = record[1];
@@ -200,7 +200,7 @@ void printer_totempg_mcast_fits (void **record)
*index, *iov_len, *copy_len, *fragment_size, *max_packet_size,
*copy_base, *next_fragment);
}
-void sync_printer_service_process (void **record)
+static void sync_printer_service_process (void **record)
{
struct memb_ring_id *ring_id = record[0];
struct memb_ring_id *sync_ring_id = record[1];
diff --git a/tools/corosync-objctl.c b/tools/corosync-objctl.c
index 36ffeaa..30be938 100644
--- a/tools/corosync-objctl.c
+++ b/tools/corosync-objctl.c
@@ -203,7 +203,7 @@ static cs_error_t validate_name(char * obj_name_pt)
return CS_ERR_INVALID_PARAM;
}
-void get_child_name(char * name_pt, char * child_name)
+static void get_child_name(const char * name_pt, char * child_name)
{
char * tmp;
char str_copy[OBJ_NAME_SIZE];
@@ -220,7 +220,7 @@ void get_child_name(char * name_pt, char * child_name)
strcpy(child_name, tmp+1);
}
-void get_parent_name(char * name_pt, char * parent_name)
+static void get_parent_name(const char * name_pt, char * parent_name)
{
char * tmp;
strcpy(parent_name, name_pt);
@@ -234,7 +234,7 @@ void get_parent_name(char * name_pt, char * parent_name)
if (tmp != NULL) *tmp = '\0';
}
-void get_key(char * name_pt, char * key_name, char * key_value)
+static void get_key(const char * name_pt, const char * key_name, char *
key_value)
{
char * tmp;
char str_copy[OBJ_NAME_SIZE];
@@ -648,4 +648,3 @@ int main (int argc, char *argv[]) {
return 0;
}
-
--
1.6.2.rc1.285.gc5f54
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais