summaryrefslogtreecommitdiffstats
path: root/libmount/src/tab_parse.c
diff options
context:
space:
mode:
authorKarel Zak2014-01-14 18:00:14 +0100
committerKarel Zak2014-01-14 18:00:14 +0100
commitea97feab8d35d0597ba134a0049183e8ca9e048b (patch)
tree83b082d9edb6175683125a34b009f5f5737bdaf7 /libmount/src/tab_parse.c
parentrename: fix mem leak [coverity scan] (diff)
downloadkernel-qcow2-util-linux-ea97feab8d35d0597ba134a0049183e8ca9e048b.tar.gz
kernel-qcow2-util-linux-ea97feab8d35d0597ba134a0049183e8ca9e048b.tar.xz
kernel-qcow2-util-linux-ea97feab8d35d0597ba134a0049183e8ca9e048b.zip
libmount: fix scanf format string [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/tab_parse.c')
-rw-r--r--libmount/src/tab_parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c
index 9246d420b..b72d9b343 100644
--- a/libmount/src/tab_parse.c
+++ b/libmount/src/tab_parse.c
@@ -127,8 +127,8 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s)
unsigned int maj, min;
char *fstype = NULL, *src = NULL, *p;
- rc = sscanf(s, "%u " /* (1) id */
- "%u " /* (2) parent */
+ rc = sscanf(s, "%d " /* (1) id */
+ "%d " /* (2) parent */
"%u:%u " /* (3) maj:min */
UL_SCNsA" " /* (4) mountroot */
UL_SCNsA" " /* (5) target */
@@ -272,8 +272,8 @@ static int mnt_parse_swaps_line(struct libmnt_fs *fs, char *s)
rc = sscanf(s, UL_SCNsA" " /* (1) source */
UL_SCNsA" " /* (2) type */
- "%jd" /* (3) size */
- "%jd" /* (4) used */
+ "%ju" /* (3) size */
+ "%ju" /* (4) used */
"%d", /* priority */
&src,