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 <julien.grall@linaro.org>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
Julien Grall authored and Jan Beulich committed 2014-04-04 11:13:32 +02:00
1 parent 2cb8e71744
commit ac0f56a2fa
1 file changed
-2
-2
View File
@@ -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 )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.