]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: clean up "%Ld/%Lu" which doesn't meet C standard
authorZeng Heng <zengheng4@huawei.com>
Fri, 18 Nov 2022 09:46:04 +0000 (10:46 +0100)
committerCarlos Maiolino <cem@kernel.org>
Mon, 21 Nov 2022 14:26:48 +0000 (15:26 +0100)
Source kernel commit: 78b0f58bdfef45aa9f3c7fbbd9b4d41abad6d85f

The "%Ld" specifier, which represents long long unsigned,
doesn't meet C language standard, and even more,
it makes people easily mistake with "%ld", which represent
long unsigned. So replace "%Ld" with "lld".

Do the same with "%Lu".

Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_bmap.c
libxfs/xfs_inode_fork.c

index 123255b646f8326af63b8c48ba828c428e85ec09..6d6f9e7dd647fadc94b8d2a82928c3b5d6bccb65 100644 (file)
@@ -287,7 +287,7 @@ xfs_check_block(
                        else
                                thispa = XFS_BMBT_PTR_ADDR(mp, block, j, dmxr);
                        if (*thispa == *pp) {
-                               xfs_warn(mp, "%s: thispa(%d) == pp(%d) %Ld",
+                               xfs_warn(mp, "%s: thispa(%d) == pp(%d) %lld",
                                        __func__, j, i,
                                        (unsigned long long)be64_to_cpu(*thispa));
                                xfs_err(mp, "%s: ptrs are equal in node\n",
index bed0c1b08a80c73a7179568cc99a044c606b2d55..f16b8ccc059b2f23df51dc159ce999e15f353059 100644 (file)
@@ -76,7 +76,7 @@ xfs_iformat_local(
         */
        if (unlikely(size > XFS_DFORK_SIZE(dip, ip->i_mount, whichfork))) {
                xfs_warn(ip->i_mount,
-       "corrupt inode %Lu (bad size %d for local fork, size = %zd).",
+       "corrupt inode %llu (bad size %d for local fork, size = %zd).",
                        (unsigned long long) ip->i_ino, size,
                        XFS_DFORK_SIZE(dip, ip->i_mount, whichfork));
                xfs_inode_verifier_error(ip, -EFSCORRUPTED,
@@ -190,7 +190,7 @@ xfs_iformat_btree(
                                        XFS_DFORK_SIZE(dip, mp, whichfork) ||
                     ifp->if_nextents > ip->i_nblocks) ||
                     level == 0 || level > XFS_BM_MAXLEVELS(mp, whichfork)) {
-               xfs_warn(mp, "corrupt inode %Lu (btree).",
+               xfs_warn(mp, "corrupt inode %llu (btree).",
                                        (unsigned long long) ip->i_ino);
                xfs_inode_verifier_error(ip, -EFSCORRUPTED,
                                "xfs_iformat_btree", dfp, size,