@@ -249,7 +249,7 @@ static void r2d_init(MachineState *machine)
cpu = cpu_sh4_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "Unable to find CPU definition\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
env = &cpu->env;
@@ -318,7 +318,7 @@ static void r2d_init(MachineState *machine)
INITRD_LOAD_OFFSET - LINUX_LOAD_OFFSET);
if (kernel_size < 0) {
fprintf(stderr, "qemu: could not load kernel '%s'\n", kernel_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* initialization which should be done by firmware */
@@ -338,7 +338,7 @@ static void r2d_init(MachineState *machine)
if (initrd_size < 0) {
fprintf(stderr, "qemu: could not load initrd '%s'\n", initrd_filename);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* initialization which should be done by firmware */
@@ -59,7 +59,7 @@ static void shix_init(MachineState *machine)
cpu = cpu_sh4_init(cpu_model);
if (cpu == NULL) {
fprintf(stderr, "Unable to find CPU definition\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
/* Allocate memory space */
@@ -82,7 +82,7 @@ static void shix_init(MachineState *machine)
ret = load_image_targphys(bios_name, 0, 0x4000);
if (ret < 0 && !qtest_enabled()) {
error_report("Could not load SHIX bios '%s'", bios_name);
- exit(1);
+ exit(EXIT_FAILURE);
}
/* Register peripherals */
This patch is the result of coccinelle script scripts/coccinelle/exit.cocci Signed-off-by: Laurent Vivier <lvivier@redhat.com> CC: Aurelien Jarno <aurelien@aurel32.net> --- hw/sh4/r2d.c | 6 +++--- hw/sh4/shix.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)