qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 759754f] readline: Remove unneeded qemu_mallocz()


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 759754f] readline: Remove unneeded qemu_mallocz() check
Date: Tue, 16 Jun 2009 21:25:09 -0000

From: Luiz Capitulino <address@hidden>

qemu_mallocz() already checks for NULL returns, readline_init() doesn't
have to do it again.

Signed-off-by: Luiz Capitulino <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]