[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] readline: Remove unneeded qemu_mallocz() check
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH] readline: Remove unneeded qemu_mallocz() check |
Date: |
Tue, 16 Jun 2009 00:41:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Luiz Capitulino wrote:
> qemu_mallocz() already checks for NULL returns, readline_init() doesn't
> have to do it again.
>
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
> 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
signature.asc
Description: OpenPGP digital signature