From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mx.groups.io with SMTP id smtpd.web10.1109.1606269273199266833 for ; Tue, 24 Nov 2020 17:54:33 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: huawei.com, ip: 45.249.212.190, mailfrom: xiewenyi2@huawei.com) Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CgkTG1Qb7z15K8P for ; Wed, 25 Nov 2020 09:54:10 +0800 (CST) Received: from HGH1000039998.huawei.com (10.184.68.188) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Wed, 25 Nov 2020 09:54:21 +0800 From: "wenyi,xie" To: , , , , CC: , Subject: [PATCH EDK2 v1 0/1] MdeModulePkg/FileExplorerLib: remove redundant null pointer check Date: Wed, 25 Nov 2020 09:52:50 +0800 Message-ID: <1606269171-21979-1-git-send-email-xiewenyi2@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.184.68.188] X-CFilter-Loop: Reflected Content-Type: text/plain Main Changes : Since Info is a pointer of struct EFI_FILE_SYSTEM_VOLUME_LABEL, and this struct has only one member VolumeLabel which is char array. So Info and Info->VolumeLabel are point to the same address, and if Info != NULL, Info->VolumeLabel == NULL is always false, it's no necessary to do null pointer check again. Wenyi Xie (1): MdeModulePkg/FileExplorerLib: remove redundant null pointer check MdeModulePkg/Library/FileExplorerLib/FileExplorer.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) -- 2.20.1.windows.1