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