From 9466d5a56c27bbf5af479412dd8f55990fad889a Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Jan 20 2023 14:35:23 +0000 Subject: dlm_controld: constify lsnames This patch constify some ls name parameter which are used read only in ls_create() and ls_find(). --- diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h index b829e0d..f0bad90 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 2c534a1..31489d5 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;