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>
This commit is contained in:
parent
9923e05e1a
commit
759754f01f
@ -467,9 +467,6 @@ ReadLineState *readline_init(Monitor *mon,
|
|||||||
{
|
{
|
||||||
ReadLineState *rs = qemu_mallocz(sizeof(*rs));
|
ReadLineState *rs = qemu_mallocz(sizeof(*rs));
|
||||||
|
|
||||||
if (!rs)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
rs->hist_entry = -1;
|
rs->hist_entry = -1;
|
||||||
rs->mon = mon;
|
rs->mon = mon;
|
||||||
rs->completion_finder = completion_finder;
|
rs->completion_finder = completion_finder;
|
||||||
|
Loading…
Reference in New Issue
Block a user