From: "Darrick J. Wong" <djwong@kernel.org>
To: Andrey Albershteyn <aalbersh@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] libxfs: fix uninit variable in libxfs_alloc_file_space
Date: Wed, 8 Jan 2025 16:57:16 -0800 [thread overview]
Message-ID: <20250109005716.GL1306365@frogsfrogsfrogs> (raw)
From: Darrick J. Wong <djwong@kernel.org>
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>
---
libxfs/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libxfs/util.c b/libxfs/util.c
index 4a9dd254083a63..3597850ddccb9a 100644
--- a/libxfs/util.c
+++ b/libxfs/util.c
@@ -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;
next reply other threads:[~2025-01-09 0:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 0:57 Darrick J. Wong [this message]
2025-01-09 6:08 ` [PATCH] libxfs: fix uninit variable in libxfs_alloc_file_space Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250109005716.GL1306365@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=aalbersh@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox