readline: Remove unneeded qemu_mallocz() check
PATCH 1/1 readline: Remove unneeded qemu_mallocz() check
qemu_mallocz() already checks for NULL returns, readline_init() doesn't have to do it again.
Signed-off-by Luiz Capitulino <[email protected]>
--- readline.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
readline.c +0 -3
@@ -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;
Signature · 1 line
1.6.3.GIT
Quoted 13 lines · Luiz Capitulino
qemu_mallocz()already checks for NULL returns,readline_init()doesn't have to do it again.Signed-off-by Luiz Capitulino <[email protected]>--- readline.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)readline.c +0
-0
readline.c ReadLineState *readline_init(Monitor *mon, · line 472
Quoted 9 lines
readline.c +0
-3@@ -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