From 4e4c9629e6db39c0b04907112f40c6b32a30bdf0 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Jul 2018 13:44:53 +0200 Subject: libmount: use const char in mountinfo parser The parser does not modify the string, so let's keep it "const char". Signed-off-by: Karel Zak --- libmount/src/tab_parse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libmount/src') diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 316aee7f6..da1f2a5b0 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -146,11 +146,12 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, const char *s) /* * Parses one line from a mountinfo file */ -static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) +static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, const char *s) { int rc, end = 0; unsigned int maj, min; - char *fstype = NULL, *src = NULL, *p; + char *fstype = NULL, *src = NULL; + const char *p; rc = sscanf(s, "%d " /* (1) id */ "%d " /* (2) parent */ -- cgit v1.2.3-55-g7522