public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* fence: master - fenced: remove const string warnings
@ 2009-06-23 7:29 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-06-23 7:29 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/fence.git?p=fence.git;a=commitdiff;h=9925e331dc5e5804070e20ae0eb88ac397f84ec4
Commit: 9925e331dc5e5804070e20ae0eb88ac397f84ec4
Parent: 4e6b7d1b208adf93797d0fb8f5b0c8c57251b4c5
Author: David Teigland <teigland@redhat.com>
AuthorDate: Tue May 12 13:09:24 2009 -0500
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Jun 23 09:26:40 2009 +0200
fenced: remove const string warnings
Signed-off-by: David Teigland <teigland@redhat.com>
---
fence/fenced/config.c | 2 +-
fence/fenced/config.h | 2 +-
fence/fenced/main.c | 13 +++++++------
fence/fenced/recover.c | 4 ++--
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/fence/fenced/config.c b/fence/fenced/config.c
index af6a159..f8e9846 100644
--- a/fence/fenced/config.c
+++ b/fence/fenced/config.c
@@ -24,7 +24,7 @@ int cfgd_skip_undefined = DEFAULT_SKIP_UNDEFINED;
int cfgd_post_join_delay = DEFAULT_POST_JOIN_DELAY;
int cfgd_post_fail_delay = DEFAULT_POST_FAIL_DELAY;
int cfgd_override_time = DEFAULT_OVERRIDE_TIME;
-char *cfgd_override_path = DEFAULT_OVERRIDE_PATH;
+const char *cfgd_override_path = DEFAULT_OVERRIDE_PATH;
#define BUFLEN MAX_NODENAME_LEN+1
diff --git a/fence/fenced/config.h b/fence/fenced/config.h
index 96c0078..102b91a 100644
--- a/fence/fenced/config.h
+++ b/fence/fenced/config.h
@@ -25,7 +25,7 @@ extern int cfgd_skip_undefined;
extern int cfgd_post_join_delay;
extern int cfgd_post_fail_delay;
extern int cfgd_override_time;
-extern char *cfgd_override_path;
+extern const char *cfgd_override_path;
#endif
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 22d696f..55f6df2 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -15,6 +15,7 @@ static struct pollfd *pollfd = NULL;
static pthread_t query_thread;
static pthread_mutex_t query_mutex;
static struct list_head controlled_entries;
+static char default_name[8];
struct client {
int fd;
@@ -327,7 +328,7 @@ static void query_node_info(int f, int data_nodeid)
struct fenced_node node;
int nodeid, rv;
- fd = find_fd("default");
+ fd = find_fd(default_name);
if (!fd) {
rv = -ENOENT;
goto out;
@@ -349,7 +350,7 @@ static void query_domain_info(int f)
struct fenced_domain domain;
int rv;
- fd = find_fd("default");
+ fd = find_fd(default_name);
if (!fd) {
rv = -ENOENT;
goto out;
@@ -369,7 +370,7 @@ static void query_domain_nodes(int f, int option, int max)
struct fenced_node *nodes = NULL;
int rv, result;
- fd = find_fd("default");
+ fd = find_fd(default_name);
if (!fd) {
result = -ENOENT;
node_count = 0;
@@ -404,11 +405,9 @@ static void query_domain_nodes(int f, int option, int max)
static void process_connection(int ci)
{
struct fenced_header h;
- char default_name[8];
char *extra = NULL;
int rv, extra_len;
- strcpy(default_name, "default");
rv = do_read(client[ci].fd, &h, sizeof(h));
if (rv < 0) {
@@ -605,7 +604,7 @@ struct controlled_entry {
char path[PATH_MAX+1];
};
-static void register_controlled_dir(char *path)
+static void register_controlled_dir(const char *path)
{
struct controlled_entry *ce;
@@ -975,6 +974,8 @@ int main(int argc, char **argv)
INIT_LIST_HEAD(&domains);
INIT_LIST_HEAD(&controlled_entries);
+ strcpy(default_name, "default");
+
read_arguments(argc, argv);
if (!daemon_debug_opt) {
diff --git a/fence/fenced/recover.c b/fence/fenced/recover.c
index 42236b0..0b495e6 100644
--- a/fence/fenced/recover.c
+++ b/fence/fenced/recover.c
@@ -95,7 +95,7 @@ static int reduce_victims(struct fd *fd)
return num_victims;
}
-static inline void close_override(int *fd, char *path)
+static inline void close_override(int *fd, const char *path)
{
unlink(path);
if (fd) {
@@ -105,7 +105,7 @@ static inline void close_override(int *fd, char *path)
}
}
-static int open_override(char *path)
+static int open_override(const char *path)
{
int ret;
mode_t om;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-23 7:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-23 7:29 fence: master - fenced: remove const string warnings Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).