[Yaffs] [PATCH] fix wrong use of sizeof in yaffs_checkpt_clo…

Páxina inicial
Anexos:
Mensaxe orixinal
+ (text/plain)
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Liao Hua
Data:  
Para: yaffs, cdhmanning
CC: wangfangpeng1, chenjie6
Asunto: [Yaffs] [PATCH] fix wrong use of sizeof in yaffs_checkpt_close
From: liaohua <>

There is a distinct bug that sizeof was used incorrectly,
causing the judgment to be ineffective and always flushing checkpt buffer.

Signed-off-by: liaohua <>
---
yaffs_checkptrw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yaffs_checkptrw.c b/yaffs_checkptrw.c
index 53688b5..f5c3be8 100644
--- a/yaffs_checkptrw.c
+++ b/yaffs_checkptrw.c
@@ -438,7 +438,7 @@ int yaffs_checkpt_close(struct yaffs_dev *dev)

     if (dev->checkpt_open_write) {
         if (dev->checkpt_byte_offs !=
-            sizeof(sizeof(struct yaffs_checkpt_chunk_hdr)))
+            sizeof(struct yaffs_checkpt_chunk_hdr))
             yaffs2_checkpt_flush_buffer(dev);
     } else if (dev->checkpt_block_list) {
         for (i = 0;
-- 
2.26.2.windows.1