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