From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: [PATCH 2/2] vhost: remove unneeded null pointer check Date: Wed, 7 Nov 2018 17:01:02 +0800 Message-ID: <20181107090102.9364-3-tiwei.bie@intel.com> References: <20181107090102.9364-1-tiwei.bie@intel.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: stable@dpdk.org To: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org Return-path: In-Reply-To: <20181107090102.9364-1-tiwei.bie@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The caller will guarantee that msg won't be null. Remove the unneeded null pointer check which caused a Coverity warning. Coverity issue: 323484 Fixes: 8f972312b8f4 ("vhost: support vhost-user") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie --- lib/librte_vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index cc154f312..3ea64eba6 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1732,7 +1732,7 @@ read_vhost_message(int sockfd, struct VhostUserMsg *msg) if (ret <= 0) return ret; - if (msg && msg->size) { + if (msg->size) { if (msg->size > sizeof(msg->payload)) { RTE_LOG(ERR, VHOST_CONFIG, "invalid msg size: %d\n", msg->size); -- 2.19.1