Null errp argument makes no sense. Assert it's not null, to make this
explicit, and guard against misuse. All current callers pass non-null
errp.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
static void hmp_handle_error(Monitor *mon, Error **errp)
{
- if (error_is_set(errp)) {
+ assert(errp);
+ if (*errp) {
monitor_printf(mon, "%s\n", error_get_pretty(*errp));
error_free(*errp);
}