summaryrefslogtreecommitdiff
path: root/e2fsck
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-07-25 11:36:43 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-07-25 11:36:43 -0500
commit274315957221e81be28fd0c2265dc553207f9a3b (patch)
tree947385eb3a84918d0c23b11f80336cbbc4040bce /e2fsck
parent583d1f83284ddfe126d97e6db0020739a1609b5a (diff)
downloade2fsprogs-274315957221e81be28fd0c2265dc553207f9a3b.tar.gz
Fix false positives from valgrind: memcpy via no-op structure copy
Don't do a structure copy via an assignment in e2fsck's pass #1 when it is a no-op in order to avoid false positives from valgrind. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'e2fsck')
-rw-r--r--e2fsck/ChangeLog6
-rw-r--r--e2fsck/pass1.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 726d63bc..53cbbb05 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-25 Theodore Ts'o <tytso@mit.edu>
+
+ * pass1.c (pass1_write_inode): Fix false positive from valgrind;
+ don't do a needless structure copy via an assignment when
+ it is a no-op.
+
2005-07-04 Theodore Ts'o <tytso@mit.edu>
* problem.c: Remove period from the Pass 1C header, to be
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 4595cbcf..605a9eaa 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -2089,7 +2089,8 @@ static errcode_t pass1_write_inode(ext2_filsys fs, ext2_ino_t ino,
{
e2fsck_t ctx = (e2fsck_t) fs->priv_data;
- if ((ino == ctx->stashed_ino) && ctx->stashed_inode)
+ if ((ino == ctx->stashed_ino) && ctx->stashed_inode &&
+ (inode != ctx->stashed_inode))
*ctx->stashed_inode = *inode;
return EXT2_ET_CALLBACK_NOTHANDLED;
}