From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Fri, 18 Sep 2020 23:57:22 +0200 Subject: [PATCH] libmultipath: prio: constify some function parameters Reviewed-by: Benjamin Marzinski Signed-off-by: Benjamin Marzinski --- libmultipath/prio.c | 4 ++-- libmultipath/prio.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmultipath/prio.c b/libmultipath/prio.c index 194563c4..3a718ba5 100644 --- a/libmultipath/prio.c +++ b/libmultipath/prio.c @@ -18,7 +18,7 @@ unsigned int get_prio_timeout(unsigned int timeout_ms, return default_timeout; } -int init_prio (char *multipath_dir) +int init_prio (const char *multipath_dir) { if (!add_prio(multipath_dir, DEFAULT_PRIO)) return 1; @@ -87,7 +87,7 @@ int prio_set_args (struct prio * p, const char * args) return snprintf(p->args, PRIO_ARGS_LEN, "%s", args); } -struct prio * add_prio (char *multipath_dir, char * name) +struct prio * add_prio (const char *multipath_dir, const char * name) { char libname[LIB_PRIO_NAMELEN]; struct stat stbuf; diff --git a/libmultipath/prio.h b/libmultipath/prio.h index 599d1d88..26754f78 100644 --- a/libmultipath/prio.h +++ b/libmultipath/prio.h @@ -55,9 +55,9 @@ struct prio { unsigned int get_prio_timeout(unsigned int checker_timeout, unsigned int default_timeout); -int init_prio (char *); +int init_prio (const char *); void cleanup_prio (void); -struct prio * add_prio (char *, char *); +struct prio * add_prio (const char *, const char *); int prio_getprio (struct prio *, struct path *, unsigned int); void prio_get (char *, struct prio *, char *, char *); void prio_put (struct prio *); -- 2.17.2