monitor: make hmp_handle_error return a boolean

This turns the pattern

  if (err) {
     hmp_handle_error(mon, err);
     return;
  }

into

  if (hmp_handle_error(mon, err)) {
     return;
  }

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-10-28 16:18:25 +01:00
parent 3e11e0b2dd
commit 0ca117a756
3 changed files with 13 additions and 20 deletions

View file

@ -16,7 +16,7 @@
#include "qemu/readline.h"
void hmp_handle_error(Monitor *mon, Error *err);
bool hmp_handle_error(Monitor *mon, Error *err);
void hmp_info_name(Monitor *mon, const QDict *qdict);
void hmp_info_version(Monitor *mon, const QDict *qdict);