]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: fix uninit variable in libxfs_alloc_file_space
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Jan 2025 21:22:04 +0000 (13:22 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 16 Jan 2025 21:27:27 +0000 (13:27 -0800)
Fix this uninitialized variable.

Coverity-id: 1637359
Fixes: b48164b8cd7618 ("libxfs: resync libxfs_alloc_file_space interface with the kernel")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/util.c

index 4a9dd254083a63763628bb6dc9234fe9966a9c6c..3597850ddccb9a0bef068da70afa54d510f6e551 100644 (file)
@@ -193,7 +193,7 @@ libxfs_alloc_file_space(
        int                     rt;
        xfs_trans_t             *tp;
        xfs_bmbt_irec_t         imaps[1], *imapp;
-       int                     error;
+       int                     error = 0;
 
        if (len <= 0)
                return -EINVAL;