* [Qemu-devel] [PATCH] readline: Remove unneeded qemu_mallocz() check
@ 2009-06-15 20:37 Luiz Capitulino
2009-06-15 22:41 ` [Qemu-devel] " Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Capitulino @ 2009-06-15 20:37 UTC (permalink / raw)
To: qemu-devel
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;
--
1.6.3.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] readline: Remove unneeded qemu_mallocz() check
2009-06-15 20:37 [Qemu-devel] [PATCH] readline: Remove unneeded qemu_mallocz() check Luiz Capitulino
@ 2009-06-15 22:41 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2009-06-15 22:41 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: qemu-devel
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-15 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 20:37 [Qemu-devel] [PATCH] readline: Remove unneeded qemu_mallocz() check Luiz Capitulino
2009-06-15 22:41 ` [Qemu-devel] " Jan Kiszka
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.