public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: dlm: master - dlm_tool: constify functions Date: Tue, 23 Jun 2009 08:21:00 -0000 [thread overview] Message-ID: <20090623082054.B354E12037D@lists.fedorahosted.org> (raw) 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:
reply other threads:[~2009-06-23 8:21 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=20090623082054.B354E12037D@lists.fedorahosted.org \ --to=fabbione@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).