From: Konrad Rzeszutek Wilk Subject: [PATCH 4/5] tmem: Pointless check of NULL against an array Date: Mon, 25 Nov 2013 12:00:41 -0500 Message-ID: <1385398842-8247-5-git-send-email-konrad.wilk@oracle.com> References: <1385398842-8247-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VkzWj-0007Up-CZ for xen-devel@lists.xenproject.org; Mon, 25 Nov 2013 17:00:49 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAPH0jQe004713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 25 Nov 2013 17:00:46 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAPH0ilb015384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 25 Nov 2013 17:00:45 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAPH0iGQ027608 for ; Mon, 25 Nov 2013 17:00:44 GMT In-Reply-To: <1385398842-8247-1-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org CID 1055632 tells us that we are comparing an array to a NULL which is indeed silly. Lets not do it. CC: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk --- xen/common/tmem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xen/common/tmem.c b/xen/common/tmem.c index 3bc35fd..1ebed8a 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1798,8 +1798,6 @@ static int do_tmem_destroy_pool(uint32_t pool_id) struct client *client = tmem_client_from_current(); struct tmem_pool *pool; - if ( client->pools == NULL ) - return 0; if ( pool_id >= MAX_POOLS_PER_DOMAIN ) return 0; if ( (pool = client->pools[pool_id]) == NULL ) -- 1.8.3.1