qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [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

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 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).