aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmount/src/optlist.c7
-rw-r--r--libmount/src/optstr.c2
2 files changed, 4 insertions, 5 deletions
diff --git a/libmount/src/optlist.c b/libmount/src/optlist.c
index 256c592fde..1d32c2dd6e 100644
--- a/libmount/src/optlist.c
+++ b/libmount/src/optlist.c
@@ -601,7 +601,7 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags,
for (ent = map; ent && ent->name; ent++) {
- char *p;
+ const char *p;
size_t sz;
struct libmnt_opt *opt;
@@ -621,7 +621,7 @@ static int optlist_add_flags(struct libmnt_optlist *ls, unsigned long flags,
sz = p - ent->name;
p -= sz;
} else {
- p = (char *) ent->name;
+ p = ent->name;
sz = strlen(ent->name); /* alone "name" */
}
@@ -1162,8 +1162,7 @@ const char *mnt_opt_get_value(struct libmnt_opt *opt)
/* check if option value is @str or comma separated @str */
int mnt_opt_value_with(struct libmnt_opt *opt, const char *str)
{
- char *p;
- const char *start = opt->value;
+ const char *p, *start = opt->value;
size_t len;
if (!str || !opt->value || !*opt->value)
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c
index ac20d87557..51526973df 100644
--- a/libmount/src/optstr.c
+++ b/libmount/src/optstr.c
@@ -807,7 +807,7 @@ int mnt_optstr_apply_flags(char **optstr, unsigned long flags,
const struct libmnt_optmap *ent;
struct ul_buffer buf = UL_INIT_BUFFER;
size_t sz;
- char *p;
+ const char *p;
ul_buffer_refer_string(&buf, *optstr);