diff options
author | Karel Zak | 2018-07-20 13:44:53 +0200 |
---|---|---|
committer | Karel Zak | 2018-07-20 13:48:09 +0200 |
commit | 4e4c9629e6db39c0b04907112f40c6b32a30bdf0 (patch) | |
tree | 1a6d76916c0edb8fb1632e3906b1ddfa5484e8f1 | |
parent | libmount: use const char in fstab parser (diff) | |
download | kernel-qcow2-util-linux-4e4c9629e6db39c0b04907112f40c6b32a30bdf0.tar.gz kernel-qcow2-util-linux-4e4c9629e6db39c0b04907112f40c6b32a30bdf0.tar.xz kernel-qcow2-util-linux-4e4c9629e6db39c0b04907112f40c6b32a30bdf0.zip |
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 <kzak@redhat.com>
-rw-r--r-- | libmount/src/tab_parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 */ |