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