From ac36743d05b376c4440e05925d2e4db6442ce797 Mon Sep 17 00:00:00 2001 From: Hongzhen Luo Date: Mon, 5 Aug 2024 15:39:53 +0800 Subject: [PATCH] erofs-utils: mkfs: fix uninitialized nblocks Coverity-id: 502376 Signed-off-by: Hongzhen Luo Reviewed-by: Sandeep Dhavale Link: https://lore.kernel.org/r/20240805073953.2864289-1-hongzhen@linux.alibaba.com Signed-off-by: Gao Xiang --- mkfs/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkfs/main.c b/mkfs/main.c index e39bddb..aba5ce4 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.34.1