[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.4] tmem: remove dumb check in do_tmem_destroy_pool



commit 6ce0c3fca9bd1c0d45908452d6e5e9f7bf22f7b7
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Fri Apr 4 11:13:32 2014 +0200
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Thu May 22 16:44:36 2014 +0100

    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@xxxxxxxxxx>
    Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    (cherry picked from commit ac0f56a2fa407e0704fade12630a5a960dedce87)
---
 xen/common/tmem.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/xen/common/tmem.c b/xen/common/tmem.c
index d9e912b..ea4d9cc 100644
--- a/xen/common/tmem.c
+++ b/xen/common/tmem.c
@@ -1845,8 +1845,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 )
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.