]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkfs.minix: fix fscanf() format string [coverity scan]
authorKarel Zak <kzak@redhat.com>
Mon, 18 Nov 2013 09:58:41 +0000 (10:58 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Nov 2013 09:58:41 +0000 (10:58 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkfs.minix.c

index dd2cf43caa0c0b4eb8c0c21c56c234343c8299ae..9fdfc637941eccbc7f344b1fb86c9b882762ef4d 100644 (file)
@@ -628,7 +628,7 @@ static void get_list_blocks(char *filename) {
                                device_name);
 
        while (!feof(listfile)) {
-               if (fscanf(listfile,"%ld\n", &blockno) != 1) {
+               if (fscanf(listfile,"%lu\n", &blockno) != 1) {
                        printf(_("badblock number input error on line %d\n"), badblocks + 1);
                        errx(MKFS_EX_ERROR, _("%s: cannot read badblocks file"),
                                        device_name);