From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.nfschina.com (mail.nfschina.com [124.16.136.209]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C15107E for ; Mon, 4 Jul 2022 10:33:25 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id EBAE81E80C95; Mon, 4 Jul 2022 18:31:27 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B6zNf4pYHTqg; Mon, 4 Jul 2022 18:31:25 +0800 (CST) Received: from node1.localdomain (unknown [219.141.250.2]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 3532F1E80C90; Mon, 4 Jul 2022 18:31:25 +0800 (CST) From: Li kunyu To: almaz.alexandrovich@paragon-software.com Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] fs/ntfs3/indx: Remove unnecessary 'NULL' values from Pointer Date: Mon, 4 Jul 2022 18:31:13 +0800 Message-Id: <20220704103113.5529-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Pointer variables allocate memory first, and then judge. There is no need to initialize the assignment. Signed-off-by: Li kunyu --- fs/ntfs3/index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ntfs3/index.c b/fs/ntfs3/index.c index 6f81e3a49abf..b5c92b6ce01c 100644 --- a/fs/ntfs3/index.c +++ b/fs/ntfs3/index.c @@ -1685,8 +1685,8 @@ indx_insert_into_buffer(struct ntfs_index *indx, struct ntfs_inode *ni, { int err; const struct NTFS_DE *sp; - struct NTFS_DE *e, *de_t, *up_e = NULL; - struct indx_node *n2 = NULL; + struct NTFS_DE *e, *de_t, *up_e; + struct indx_node *n2; struct indx_node *n1 = fnd->nodes[level]; struct INDEX_HDR *hdr1 = &n1->index->ihdr; struct INDEX_HDR *hdr2; -- 2.18.2