From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCHv2 dlm-tool 2/3] dlm_controld: constify lsnames
Date: Mon, 16 Jan 2023 14:50:50 -0500 [thread overview]
Message-ID: <20230116195051.2858791-2-aahringo@redhat.com> (raw)
In-Reply-To: <20230116195051.2858791-1-aahringo@redhat.com>
This patch constify some ls name parameter which are used read only in
ls_create() and ls_find().
---
dlm_controld/dlm_daemon.h | 2 +-
dlm_controld/main.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h
index b829e0de..f0bad90f 100644
--- a/dlm_controld/dlm_daemon.h
+++ b/dlm_controld/dlm_daemon.h
@@ -479,7 +479,7 @@ int client_add(int fd, void (*workfn)(int ci), void (*deadfn)(int ci));
int client_fd(int ci);
void client_ignore(int ci, int fd);
void client_back(int ci, int fd);
-struct lockspace *find_ls(char *name);
+struct lockspace *find_ls(const char *name);
struct lockspace *find_ls_id(uint32_t id);
const char *dlm_mode_str(int mode);
void cluster_dead(int ci);
diff --git a/dlm_controld/main.c b/dlm_controld/main.c
index 2c534a1e..31489d54 100644
--- a/dlm_controld/main.c
+++ b/dlm_controld/main.c
@@ -537,7 +537,7 @@ static int check_run_operation(char *uuid_str, uint32_t flags, struct dlmc_run_c
return 0;
}
-static struct lockspace *create_ls(char *name)
+static struct lockspace *create_ls(const char *name)
{
struct lockspace *ls;
@@ -562,7 +562,7 @@ static struct lockspace *create_ls(char *name)
return ls;
}
-struct lockspace *find_ls(char *name)
+struct lockspace *find_ls(const char *name)
{
struct lockspace *ls;
--
2.31.1
next prev parent reply other threads:[~2023-01-16 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 19:50 [Cluster-devel] [PATCHv2 dlm-tool 1/3] dlm_controld: increase uevent recv buffer Alexander Aring
2023-01-16 19:50 ` Alexander Aring [this message]
2023-01-16 19:50 ` [Cluster-devel] [PATCHv2 dlm-tool 3/3] dlm_controld: better uevent filtering Alexander Aring
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=20230116195051.2858791-2-aahringo@redhat.com \
--to=aahringo@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: link
Be 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 NNTP newsgroup(s).