[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v2 2/4] hw/ppc/spapr_drc: Replace error_setg(&error_ab
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-ppc] [PATCH v2 2/4] hw/ppc/spapr_drc: Replace error_setg(&error_abort) by abort() |
Date: |
Thu, 7 Jun 2018 11:46:43 -0300 |
Use abort() instead of error_setg(&error_abort),
as suggested by the "qapi/error.h" documentation:
Please don't error_setg(&error_fatal, ...), use error_report() and
exit(), because that's more obvious.
Likewise, don't error_setg(&error_abort, ...), use assert().
Use abort() instead of the suggested assert() because the assertion is
already verified by the switch case.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/ppc/spapr_drc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index 8a045d6b93..b934b9c9ed 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -366,7 +366,7 @@ static void prop_get_fdt(Object *obj, Visitor *v, const
char *name,
break;
}
default:
- error_setg(&error_abort, "device FDT in unexpected state: %d",
tag);
+ abort(); /* device FDT in unexpected state */
}
fdt_offset = fdt_offset_next;
} while (fdt_depth != 0);
--
2.17.1