This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
dlm: master - dlm_tool: constify functions
- From: "Fabio M. Di Nitto" <fabbione at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Tue, 23 Jun 2009 08:20:54 +0000 (UTC)
- Subject: dlm: master - dlm_tool: constify functions
Gitweb: http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=1dd78419c2736f3a53cebc0f747173aac7faa99d
Commit: 1dd78419c2736f3a53cebc0f747173aac7faa99d
Parent: a85ecdfac42395f348edccb10eb44672f6a5c10c
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Wed May 6 06:56:20 2009 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Tue Jun 23 09:42:35 2009 +0200
dlm_tool: constify functions
addresses several: return discards qualifiers from pointer target type
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
dlm/tool/main.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlm/tool/main.c b/dlm/tool/main.c
index 838f31e..51a4432 100644
--- a/dlm/tool/main.c
+++ b/dlm/tool/main.c
@@ -111,7 +111,7 @@ struct summary {
unsigned int expect_replies;
};
-char *mode_str(int mode)
+const char *mode_str(int mode)
{
switch (mode) {
case -1:
@@ -132,7 +132,7 @@ char *mode_str(int mode)
return "??";
}
-char *msg_str(int type)
+const char *msg_str(int type)
{
switch (type) {
case DLM_MSG_REQUEST:
@@ -570,7 +570,7 @@ struct lkb {
int nodeid, ownpid, status, grmode, rqmode, highbast, rsb_lookup, wait_type;
};
-char *pr_grmode(struct lkb *lkb)
+const char *pr_grmode(struct lkb *lkb)
{
if (lkb->status == DLM_LKSTS_GRANTED || lkb->status == DLM_LKSTS_CONVERT)
return mode_str(lkb->grmode);
@@ -580,7 +580,7 @@ char *pr_grmode(struct lkb *lkb)
return "XX";
}
-char *pr_rqmode(struct lkb *lkb)
+const char *pr_rqmode(struct lkb *lkb)
{
static char buf[5];
@@ -598,7 +598,7 @@ char *pr_rqmode(struct lkb *lkb)
}
}
-char *pr_remote(struct lkb *lkb, struct rinfo *ri)
+const char *pr_remote(struct lkb *lkb, struct rinfo *ri)
{
static char buf[64];
@@ -615,7 +615,7 @@ char *pr_remote(struct lkb *lkb, struct rinfo *ri)
}
}
-char *pr_wait(struct lkb *lkb)
+const char *pr_wait(struct lkb *lkb)
{
static char buf[16];
@@ -1039,7 +1039,7 @@ static char *dlmc_lf_str(uint32_t flags)
return str;
}
-static char *nf_check_str(uint32_t flags)
+static const char *nf_check_str(uint32_t flags)
{
if (flags & DLMC_NF_CHECK_FENCING)
return "fence";
@@ -1053,7 +1053,7 @@ static char *nf_check_str(uint32_t flags)
return "none";
}
-static char *condition_str(int cond)
+static const char *condition_str(int cond)
{
switch (cond) {
case 0: