From: Karel Zak Date: Fri, 20 Jul 2018 11:44:53 +0000 (+0200) Subject: libmount: use const char in mountinfo parser X-Git-Tag: v2.33-rc1~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e4c9629e6db39c0b04907112f40c6b32a30bdf0;p=thirdparty%2Futil-linux.git 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 --- diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 316aee7f63..da1f2a5b09 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 */