[PATCH] erofs-utils: mkfs: fix uninitialized nblocks
Hongzhen Luo
hongzhen at linux.alibaba.com
Mon Aug 5 17:39:53 AEST 2024
Coverity-id: 502376
Signed-off-by: Hongzhen Luo <hongzhen at linux.alibaba.com>
---
mkfs/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/main.c b/mkfs/main.c
index f9ac4bd..3605e64 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1142,7 +1142,7 @@ int main(int argc, char **argv)
int err = 0;
struct erofs_buffer_head *sb_bh;
struct erofs_inode *root = NULL;
- erofs_blk_t nblocks;
+ erofs_blk_t nblocks = 0;
struct timeval t;
FILE *packedfile = NULL;
FILE *blklst = NULL;
--
2.43.5
More information about the Linux-erofs
mailing list