From: Jan Kiszka <jan.kiszka@web.de>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: [PATCH] readline: Remove unneeded qemu_mallocz() check
Date: Tue, 16 Jun 2009 00:41:35 +0200 [thread overview]
Message-ID: <4A36CE1F.2080408@web.de> (raw)
In-Reply-To: <20090615173731.026e9fa9@doriath>
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
Luiz Capitulino wrote:
> qemu_mallocz() already checks for NULL returns, readline_init() doesn't
> have to do it again.
>
> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
> ---
> readline.c | 3 ---
> 1 files changed, 0 insertions(+), 3 deletions(-)
>
> diff --git a/readline.c b/readline.c
> index 9c500f1..7834af0 100644
> --- a/readline.c
> +++ b/readline.c
> @@ -467,9 +467,6 @@ ReadLineState *readline_init(Monitor *mon,
> {
> ReadLineState *rs = qemu_mallocz(sizeof(*rs));
>
> - if (!rs)
> - return NULL;
> -
> rs->hist_entry = -1;
> rs->mon = mon;
> rs->completion_finder = completion_finder;
Ack.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
prev parent reply other threads:[~2009-06-15 22:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-15 20:37 [Qemu-devel] [PATCH] readline: Remove unneeded qemu_mallocz() check Luiz Capitulino
2009-06-15 22:41 ` Jan Kiszka [this message]
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=4A36CE1F.2080408@web.de \
--to=jan.kiszka@web.de \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).