lkml.org 
[lkml]   [2024]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] dm vdo: fix an assert statement in start_restoring_volume_sub_index()
Date
Use "==" instead of "=" in ASSERT() statement.

Fixes: ef074a31e88e ("dm vdo: implement the volume index")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
This is based on static analysis with Smatch and only compile tested.
---
drivers/md/dm-vdo/indexer/volume-index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-vdo/indexer/volume-index.c b/drivers/md/dm-vdo/indexer/volume-index.c
index 5fe34e6c1d9b..d6526fe9bbfc 100644
--- a/drivers/md/dm-vdo/indexer/volume-index.c
+++ b/drivers/md/dm-vdo/indexer/volume-index.c
@@ -830,7 +830,7 @@ static int start_restoring_volume_sub_index(struct volume_sub_index *sub_index,
decode_u32_le(buffer, &offset, &header.first_list);
decode_u32_le(buffer, &offset, &header.list_count);

- result = ASSERT(offset = sizeof(buffer),
+ result = ASSERT(offset == sizeof(buffer),
"%zu bytes decoded of %zu expected", offset,
sizeof(buffer));
if (result != UDS_SUCCESS)
--
2.39.3

\
 
 \ /
  Last update: 2024-05-27 14:57    [W:0.032 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site