public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: David Teigland <teigland@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: STABLE3 - dlm_tool: constify functions Date: Mon, 11 May 2009 15:13:00 -0000 [thread overview] Message-ID: <20090511151230.1CF511201EC@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5ab1ddf9a2f20853e105fab7176850534600fbeb Commit: 5ab1ddf9a2f20853e105fab7176850534600fbeb Parent: c3bfe36a2f1933bdcbe204841e14d07c131e6ba7 Author: Fabio M. Di Nitto <fdinitto@redhat.com> AuthorDate: Wed May 6 06:56:20 2009 +0200 Committer: David Teigland <teigland@redhat.com> CommitterDate: Mon May 11 10:05:05 2009 -0500 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 1011f1e..5dff9a4 100644 --- a/dlm/tool/main.c +++ b/dlm/tool/main.c @@ -109,7 +109,7 @@ struct summary { unsigned int expect_replies; }; -char *mode_str(int mode) +const char *mode_str(int mode) { switch (mode) { case -1: @@ -130,7 +130,7 @@ char *mode_str(int mode) return "??"; } -char *msg_str(int type) +const char *msg_str(int type) { switch (type) { case DLM_MSG_REQUEST: @@ -568,7 +568,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); @@ -578,7 +578,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]; @@ -596,7 +596,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]; @@ -613,7 +613,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]; @@ -1041,7 +1041,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"; @@ -1055,7 +1055,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:
reply other threads:[~2009-05-11 15:13 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090511151230.1CF511201EC@lists.fedorahosted.org \ --to=teigland@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).