From: Julien Grall Date: Fri, 4 Apr 2014 09:13:32 +0000 (+0200) Subject: tmem: remove dumb check in do_tmem_destroy_pool X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5256 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ac0f56a2fa407e0704fade12630a5a960dedce87;p=xen.git tmem: remove dumb check in do_tmem_destroy_pool do_tmem_destroy_pool is checking if pools == NULL. But, pools is a fixed array. Clang 3.5 will fail to compile xen/common/tmem.c with the following error: tmem.c:1848:18: error: comparison of array 'client->pools' equal to a null pointer is always false [-Werror,-Wtautological-pointer-compare] if ( client->pools == NULL ) Coverity-ID:1055632 Signed-off-by: Julien Grall Acked-by: Konrad Rzeszutek Wilk --- diff --git a/xen/common/tmem.c b/xen/common/tmem.c index 73007f79a4..602a38b509 100644 --- a/xen/common/tmem.c +++ b/xen/common/tmem.c @@ -1848,8 +1848,6 @@ static int do_tmem_destroy_pool(uint32_t pool_id) struct client *client = current->domain->tmem_client; 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 )