Blame SOURCES/0078-fs-ntfs3-Remove-a-useless-test-in-indx_find.patch

Kmods SIG 63c143
From d2846bf33c1423ff872c7a7c2afde292ad502c04 Mon Sep 17 00:00:00 2001
Kmods SIG 63c143
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Kmods SIG 63c143
Date: Sat, 18 Sep 2021 21:56:19 +0200
Kmods SIG 63c143
Subject: [Backport d2846bf33c14] src: Remove a useless test in
Kmods SIG 63c143
 'indx_find()'
Kmods SIG 63c143
Kmods SIG 63c143
'fnd' has been dereferenced several time before, so testing it here is
Kmods SIG 63c143
pointless.
Kmods SIG 63c143
Moreover, all callers of 'indx_find()' already have some error handling
Kmods SIG 63c143
code that makes sure that no NULL 'fnd' is passed.
Kmods SIG 63c143
Kmods SIG 63c143
So, remove the useless test.
Kmods SIG 63c143
Kmods SIG 63c143
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Kmods SIG 63c143
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
Kmods SIG 63c143
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Kmods SIG 63c143
---
Kmods SIG 63c143
 src/index.c | 4 +---
Kmods SIG 63c143
 1 file changed, 1 insertion(+), 3 deletions(-)
Kmods SIG 63c143
Kmods SIG 63c143
diff --git a/src/index.c b/src/index.c
Kmods SIG 63c143
index 4f71a91f07d9fc56efe6a80ebf52995e2e9a65de..6f81e3a49abfb30f7aa570e26cf595b3e8599032 100644
Kmods SIG 63c143
--- a/src/index.c
Kmods SIG 63c143
+++ b/src/index.c
Kmods SIG 63c143
@@ -1072,9 +1072,7 @@ int indx_find(struct ntfs_index *indx, struct ntfs_inode *ni,
Kmods SIG 63c143
 	if (!e)
Kmods SIG 63c143
 		return -EINVAL;
Kmods SIG 63c143
 
Kmods SIG 63c143
-	if (fnd)
Kmods SIG 63c143
-		fnd->root_de = e;
Kmods SIG 63c143
-
Kmods SIG 63c143
+	fnd->root_de = e;
Kmods SIG 63c143
 	err = 0;
Kmods SIG 63c143
 
Kmods SIG 63c143
 	for (;;) {
Kmods SIG 63c143
-- 
Kmods SIG 63c143
2.31.1
Kmods SIG 63c143