From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH 4/5] tmem: Pointless check of NULL against an array
Date: Mon, 25 Nov 2013 17:19:32 +0000 [thread overview]
Message-ID: <529386A4.9020005@citrix.com> (raw)
In-Reply-To: <1385398842-8247-5-git-send-email-konrad.wilk@oracle.com>
On 25/11/13 17:00, Konrad Rzeszutek Wilk wrote:
> CID 1055632 tells us that we are comparing an array to a NULL
> which is indeed silly. Lets not do it.
>
> CC: Bob Liu <bob.liu@oracle.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> 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;
client->pools certainly can't be null, but client certainly can. This
should be "if ( !client )"
~Andrew
> if ( pool_id >= MAX_POOLS_PER_DOMAIN )
> return 0;
> if ( (pool = client->pools[pool_id]) == NULL )
next prev parent reply other threads:[~2013-11-25 17:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 17:00 [PATCH] Coverity patches (tmem/xenstat) v1 Konrad Rzeszutek Wilk
2013-11-25 17:00 ` [PATCH 1/5] xc/tmem: Free temporary buffer used during migration Konrad Rzeszutek Wilk
2013-11-25 17:09 ` Andrew Cooper
2013-11-25 17:00 ` [PATCH 2/5] xc/tmem: Unchecked return value Konrad Rzeszutek Wilk
2013-11-25 17:11 ` Andrew Cooper
2013-11-25 19:53 ` Konrad Rzeszutek Wilk
2013-11-25 17:00 ` [PATCH 3/5] tmem: Check copy_to_user_* " Konrad Rzeszutek Wilk
2013-11-25 17:16 ` Andrew Cooper
2013-11-26 8:21 ` Jan Beulich
2013-11-26 18:16 ` Konrad Rzeszutek Wilk
2013-11-25 17:00 ` [PATCH 4/5] tmem: Pointless check of NULL against an array Konrad Rzeszutek Wilk
2013-11-25 17:19 ` Andrew Cooper [this message]
2013-11-25 19:54 ` Konrad Rzeszutek Wilk
2013-11-26 8:27 ` Jan Beulich
2013-11-25 17:00 ` [PATCH 5/5] xenstat: Fix buffer over-run with new_domains being negative (again) Konrad Rzeszutek Wilk
2013-11-25 17:06 ` Ian Campbell
2013-11-25 17:36 ` Andrew Cooper
2013-11-25 19:51 ` Konrad Rzeszutek Wilk
2013-11-26 8:40 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=529386A4.9020005@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.