Commit 759754f01ff64d5b85d7e7357b9e77e8617a8e41
Committed by
Anthony Liguori
1 parent
9923e05e
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 <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
0 additions
and
3 deletions
readline.c
@@ -467,9 +467,6 @@ ReadLineState *readline_init(Monitor *mon, | @@ -467,9 +467,6 @@ ReadLineState *readline_init(Monitor *mon, | ||
467 | { | 467 | { |
468 | ReadLineState *rs = qemu_mallocz(sizeof(*rs)); | 468 | ReadLineState *rs = qemu_mallocz(sizeof(*rs)); |
469 | 469 | ||
470 | - if (!rs) | ||
471 | - return NULL; | ||
472 | - | ||
473 | rs->hist_entry = -1; | 470 | rs->hist_entry = -1; |
474 | rs->mon = mon; | 471 | rs->mon = mon; |
475 | rs->completion_finder = completion_finder; | 472 | rs->completion_finder = completion_finder; |